Hi,
Wonderful repo you have. Been reading over source and docs to understand what's going and it's been easy to understand.
I'm a fairly new user to WSL (Windows Subsystem for Linux) and wanted to get VSCode (installed in Windows) playing nicely with ruby installation in Bash on Windows. I feel like I could follow https://github.com/rubyide/vscode-ruby/wiki/3.-Attaching-to-a-debugger but I'm not 100% sure how to translate the steps.
Would you consider adding a specific tutorial, instructions, or example config for using WSL ruby installation and VS Code (installed on windows)?
Thanks
I've been able to make some basic progress on using the remote debugger but no luck on the autocomplete.
My script is as follows:
# main.rb
puts 'helloworld'
x = 123
puts 'abcd'
puts x
x = 456 # breakpoint here
x = 789
puts x
puts 'ddd'
In the terminal, I run the following command with the following output:
wasd@DESKTOP-KIQSRF6:/mnt/c/Users/wasd/Programs/99oop$ rdebug-ide --host 127.0.0.1 --port 3001 main.rb
Fast Debugger (ruby-debug-ide 0.6.0, debase 0.2.1, file filtering is supported) listens on 127.0.0.1:3001
I then run the command in WSL which has the following configuration:
{
"name": "Listen for rdebug-ide",
"type": "Ruby",
"request": "attach",
"cwd": "${workspaceRoot}",
"remoteHost": "127.0.0.1",
"remotePort": "3001",
"remoteWorkspaceRoot": "${workspaceRoot}"
},
After clicking play, in VS Code, exits the command and outputs the following:
abcd
123
789
ddd
It doesn't appear to be stopping at the breakpoint but ignoring it. Any advice would be appreciated.
Any docs at all on wsl integration would be appreciated.
"Fully tested against *nix/Windows and Ruby 1.9.3 to 2.2.0" means Windows WSL ?
Closing for issue cleanup. Apologies if this is still an issue. We are working to improve the core extension experience.
@wingrunr21 It's still an issue but I've moved on and am no longer using WSL. I've returned to using Ubuntu as my daily driver.
Thanks for letting me know!
I noticed that you should set remoteWorkspaceRoot as WSL path (e.g. /mnt/c/Users/wasd/Programs/99oop), since "${workspaceRoot}" represents Windows path which is not vaild path under WSL.
Most helpful comment
I've been able to make some basic progress on using the remote debugger but no luck on the autocomplete.
My script is as follows:
In the terminal, I run the following command with the following output:
I then run the command in WSL which has the following configuration:
After clicking play, in VS Code, exits the command and outputs the following:
It doesn't appear to be stopping at the breakpoint but ignoring it. Any advice would be appreciated.