I need some help, please, with creating gutters markers programmatically. This is more of a question and not a bug. I’ve read through many of the discussions here but couldn’t come up with a solution.
I’m building a debugger on top of code-mirror, and I’m following this example to implement breakpoints: CodeMirror Gutter Example.
When the user clicks the gutters, everything works well.
What I’m trying to do without success is to show breakpoints programmatically from my code without the user clicking the gutter, mainly when a user moves between files.
I have tried many things like dispatching an effect or creating a rangeset and updating the state field.
The toggleBreakpoint function in the example does pretty much what you need to do here — dispatch a transaction with a breakpointEffect that adds the breakpoint.
I mentioned above that the code in codesandbox sets renderEmptyElements to true to cancel the breakpoint exception. I canceled the third but actually canceled the first
My local code will also have such an exception, I am not sure if this is a codemirror problem?