VS Code debugger not working properly

I just got VS Code setup and everything is working as it should. I do have a problem though where the debugger is in break mode but VS doesn’t show it.

Condition: This only happens depending where the method is called from. For example after restarting the debugger all the break points are his until I call the method from a source like the toolbar or a callback from a window.

What is the problem?

  1. When the issue occurs SketchUp freezes as is normal when a breakpoint is hit.

  2. The Call Stack is empty but displays PAUSED ON BREAKPOINT.

  3. The debug toolbar appears not to be in break mode.

  4. Disconnecting or restarting the debugger will allow SketchUp to continue, however the breakpoints are not able to be stepped through.

This is the only last thing preventing me from enjoying VS Code. I’m totally out of ideas to try.

BTW: I’m switching from Netbeans and already like it much better.

PS: I did see this topic, but I don’t know if it’s the same issue.

More info:

Pressing F5 or F10 actually does continue the code, but no debug info is displayed (variables, call stack, or break point). :confused:

It surely looks like a bug in VS Code. In fact I can get the variable from the Debu console!


@tt_su Are you seeing this behavior? Any ideas? This is driving me nuts.

OK I’ve got my answer partially.

  1. I was using Sketchup.require to load the files. This loaded the rbs files from the plugin directory instead of my test files.

If I require the test files directly instead of the rbs files everything works as it should. However if I load a test file to overwrite methods that have been already require in the rbs file then the debugger doesn’t show my steps. I can prove however that the newly loaded file is being stepped through by calling `caller.first1 from the debug console.

In fact adding a new dreakpoint and then pressing F5 will report the debugger paused at the breakpoint line but no degub info is shown.

OK It seems that rbs files permanently confuse the debugger. I’ve replaced the files in the extension to load rb files at startup and the debugger now works properly when reloading files at run time. Whew :tired_face:

I have seen something similar - I think. But I haven’t been able to reliably reproduce it.

hmm… I’ve never developed with rbs files though. Do you have rbs files side by side with rb files when developing?

When my extension updates the rbs files are automatically installed along side the rb files. It seems that SketchUp.require loads the rbs files if both rb and rbs files exist. When debugging I would reload the development rb files as changes were made, but if the original file loaded was an rbs, it confuses the debugger, even after reloading and rb file. Note that in Netbeans the debugger handled it fine, so I believe the problem to be specific to VS Code.

Yes, SketchUp will load RBE, RBS then RB in that order.
I’d recommend keeping RBE/RBS files away from development directory.

Yup It’s the Plugin files that are the problem. I use this extension at times when I’m not developing. Then when I go to develop the rbs files are in the way if any updates have been installed using the installer. (The installer copies in the RBS files)