vscode-ruby version: 0.15.0Make sure you have ruby, ruby-debug-ide and ruby-debug-basex19 installed before submitting your issue -- thank you !
ruby-debug-ide (0.6.0)
ruby-debug-base (0.10.6 java)
Breakpoints should hit in VS Code.
The code runs, but the breakpoint is never hit. I also cannot click on lines in the DEBUG CONSOLE to navigate to the file in question, so it feels like other things are broken as well.
With MRI 2.4.2, both of these work fine. I have multiple Ruby versions installed using rvm, since we are using different versions for different projects.
Run the RSpec - all target in the Debug view in VS Code. My launch.json is pretty much the autogenerated file, with added env variables to make my app work.
I tried installing the debase gem, but it fails to compile the C extension. Is this gem needed for successful debugging on JRuby?
FWIW, the issue still remained but I noted that some of the debugging gems complained on startup saying that it won't be able to trace all events if the process is running without the --debug flag.
Said and done, I added that flag and _now it works_ successfully! Which is incredibly nice. Full launch.json example provided below to help others who might be running into the same issue:
{
"version": "0.2.0",
"configurations": [
{
"name": "uxfactory server",
"type": "Ruby",
"request": "launch",
"cwd": "${workspaceRoot}",
"env": {
"JRUBY_OPTS": "--debug"
},
"program": "${workspaceRoot}/bin/uxfactory",
"args": [
"--port",
"8777"
]
}
]
}
Most helpful comment
FWIW, the issue still remained but I noted that some of the debugging gems complained on startup saying that it won't be able to trace all events if the process is running without the
--debugflag.Said and done, I added that flag and _now it works_ successfully! Which is incredibly nice. Full
launch.jsonexample provided below to help others who might be running into the same issue: