Closed BenSandeen closed 5 years ago
The VS Code debugger ('node') does not yet support 'live edit'. This means that whenever you edit source while a debug session is active, the debugger is not aware of the source change and line and column locations are not displayed correctly. To make the user aware of this we show breakpoints in grey after a source edit.
@isidorn currently the yellow current line is adjusted after lines are inserted or deleted. This is confusing because the user thinks that the debugger has picked up the changes (which it didn't). And another 'step' makes the current line jump back to the original location. I suggest that we do not adjust the current line when the editor is dirty.
@roblourens I noticed that 'node2' shows some erratic behaviour when inserting lines while a debug session is active. Are you already trying to support 'live edit'?
@weinand the yellow current line is implemented using editor decorations and this is just how editor decorations work - namely they are tied to the location in the edior and as that location changes the decorations automatically update. Also not adjusting a current line would have the downside of making it confuzing for adapters that do support live editor.
Closing as will not fix
@isidorn if the current implementation does not work for us, then we will have to fix this on our end.
If we start supporting live editing, then we will have to address your second argument.
No, I'm not doing anything to support live edit.
node2 doesn't look any more erratic than node-debug to me. It's what I expect, if I insert a line, then the highlight is off by a line.
I still have no immediate plans of fixing this. @weinand leaving up to you to close if you want
This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider.
If you wonder what we are up to, please see our roadmap and issue reporting guidelines.
Thanks for your understanding and happy coding!
Steps to Reproduce: