vscode-ruby version: 0.5.2config looks like:
{
"name": "Listen for rdebug-ide",
"type": "Ruby",
"request": "attach",
"cwd": "${workspaceRoot}",
"remoteHost": "127.0.0.1",
"remotePort": "1234",
"remoteWorkspaceRoot": "${workspaceRoot}"
}
Make sure you have ruby, ruby-debug-ide and ruby-debug-basex19 installed before submitting your issue -- thank you !
on remote server I:
$ rdebug-ide try.rb
Fast Debugger (ruby-debug-ide 0.6.0, debase 0.2.1, file filtering is supported) listens on 127.0.0.1:1234
I have ssh tunnel to remote host on same port.
I set a breakpoint in the code.
I click run in debugger.
expect debugger to stop at breakpoint, It doesn't it runs the program to completion.
doesn't stop at breakpoint.
@jots
You must configure "remoteWorkspaceRoot". :)
I have the same problem.
I'm using Vagrant and I can successfully launch the debug-ide on the remote VM. Then, after clicking the debug arrow in VScode, it launches my Rails app and everything works fine. However, if I set some breakpoints and try to load the related webpages, it just freezes and the webpage never loads, as if the breakpoint had been hit, except it doesn't. There's no indication of anything happening whatsoever on the vscode debug panel.
I just ran into this issue with VSCode and was able to fix it by changing the remoteWorkspaceRoot in the launch.json configuration to the path of the Vagrant guest. By default it has:
{
"name": "Listen for rdebug-ide",
"type": "Ruby",
"request": "attach",
"cwd": "${workspaceRoot}",
"remoteHost": "127.0.0.1",
"remotePort": "1234",
"remoteWorkspaceRoot": "${workspaceRoot}"
}
Change:
"remoteWorkspaceRoot": "/home/vagrant/XXXX"
@codemeow5 What should it point to?
Closing for issue cleanup. Apologies if this is still an issue. We are working to improve the core extension experience.
@johnkchiu is correct: you need to give "remoteWorkspaceRoot" the correct value. The value should be the absolute path where your remote Ruby project lives.
For my Docker image, this was in /usr/src/app, so I set "remoteWorkspaceRoot": "/usr/src/app" and breakpoints started working.
I finally managed to get this working (with some help!) in the end using the insider build of VS code (1.35.0-insider). Set up as follows
{
"name": "Rails server",
"type": "Ruby",
"request": "launch",
"cwd": "${workspaceRoot}",
"showDebuggerOutput": true,
"program": "${workspaceRoot}/bin/rails",
"args": [
"s"
]
}
I had to uninstall older versions of debase and ruby-debug-ide and update to the latest beta versions. It now respects breakpoints. Current Version information:
Ruby: 2.5.1
Rails: 5.2.0
ruby-debug-ide: (0.7.0.beta7)
Debase: 0.2.3.beta5
I also did the following:
Most helpful comment
I just ran into this issue with VSCode and was able to fix it by changing the
remoteWorkspaceRootin thelaunch.jsonconfiguration to the path of the Vagrant guest. By default it has:Change: