VSCode debugging for SketchUp 2022

Has anyone here gotten VSCode debugging working on Mac for SketchUp 2022? I am finding that every time I attempt to launch SketchUp with the required command line to enable rdebug, it crashes ( e.g. Crash #3412), so of course VSCode can’t attach to it. Before you ask, yes I downloaded the latest version of the debugger dylib from GitHub. and put it into the specified place in the SketchUp.app bundle. And yes. I triple-checked the command line.

Also, does anyone know what Ruby version VSCode uses and how it gets it? I used rvm to get Ruby 2.7.2 and activate it on my Mac, but I am getting error messages such as inability to start Solargraph that make me think VSCode is using something else.

Is it similar to this issue reported? SketchUp crashes when launched with debugger on Monterey 12.01 and Apple silicon · Issue #34 · SketchUp/sketchup-ruby-debugger · GitHub

If so, can you add your details there (including machine specs, such as which macOS version and architecture?)

(Yes, the debugger was tested to work on both intel and ARM architecture. Maybe there’s a dependency issue going on.)

I don’t recall, but the solargraph documentation should describe this. Should be a setting you can configure as well. I would think it’d pick the system default if nothing is set. (You can set a given ruby version as default via rmv)

Btw, the Ruby version Solargraph in VSCode uses doesn’t relate at all with SketchUp. These things don’t have to match.

1 Like

I’ll go look at the issue there to see if it is similar. Mine is a 2019 16" MacBook Pro - Intel chip - running Monterey 12.2.1.

I used rvm to set 2.7.2 as active both before launching VS Code and via the terminal in VS Code. For a while I was still seeing error reports on launch of VS Code that appeared to come from Ruby 2.0.0. Those have gone away, but Solargraph still posts messages it can’t run.

Edit: BTW at least to my eye it looks like the BugSplat I submitted has symbols and offsets about where the crash occurred.

1 Like

I added some comments to the git-hub topic @tt_su referenced, including a full crash report after building from the source code and some observations about where the crash appears to be happening.

1 Like