sketchup-ruby-debugger icon indicating copy to clipboard operation
sketchup-ruby-debugger copied to clipboard

Removing breakpoint from VSCode doesn't work

Open thomthom opened this issue 7 years ago • 9 comments

When I set a breakpoint in VSCode, then try to remove it during a debug session it continues to break.

In this current scenario where I observe that I set a breakpoint within a loop. After hitting the breakpoint I then remove it and continue execution. But the code continues to break at the line where the breakpoint used to be. VSCode no longer lists any breakpoints.

Seems to be a synchronization issue.

vs-code-debug-issue-17.zip

vscodedebugissue

  1. Set a breakpoint inside a loop
  2. Run the code that trigger the breakpoint
  3. Remove the breakpoint from VSCode
  4. Continue execution (F5)

Expected behaviour is that the loop continues without hitting the removed breakpoint. Observed behaviour is that the breakpoint continues to break.

Compare this to RubyMine which works as expected:

rubyminedebug

thomthom avatar Feb 16 '18 13:02 thomthom

I can't duplicate. Can you provide a minimal VSCode folder that shows this?

BugraBarin avatar Feb 25 '18 20:02 BugraBarin

@BugraBarin I added a Zip file with complete extension project and fleshed out repro steps.

thomthom avatar Feb 26 '18 12:02 thomthom

Thanks that did it. Breakpoint doesn't have to be in a loop either. I am also seeing an assertion within VSCode when trying to remove the breakpoint and the message never gets sent to our debugger. This definitely looks to be all occurring within the VSCode extension.

BugraBarin avatar Feb 26 '18 15:02 BugraBarin

So then we should probably prepare an example for standalone Ruby and submit that to the VSCode extension?

(Any idea how one run a Ruby debug server for standalone Ruby?)

thomthom avatar Feb 26 '18 16:02 thomthom

That would be worth pursuing. Something about that folder may be causing it, maybe the path names.

BugraBarin avatar Feb 26 '18 17:02 BugraBarin

Why would the path names be of significance? I'm able to set/remove breakpoint as long as the debugger isn't busy stepping through code.

thomthom avatar Feb 27 '18 11:02 thomthom

I managed to reproduce it with standalone Ruby. Even found an existing issue:

https://github.com/rubyide/vscode-ruby/issues/44

Though it's nearly two years old... :/

thomthom avatar Feb 27 '18 14:02 thomthom

Good find! We may have to dig into it ourselves.

BugraBarin avatar Feb 27 '18 15:02 BugraBarin

Any experience with VSCode extension development?

thomthom avatar Feb 27 '18 17:02 thomthom