First install some package
gem install rebase ruby-debug-ide
edit launch.json
to this
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Rails server",
"type": "Ruby",
"request": "launch",
"program": "${workspaceRoot}/bin/rails",
"pathToBundler": "~/.rbenv/shims/bundle",
"pathToRuby": "~/.rbenv/shims/gem",
"pathToRDebugIDE": "~/.rbenv/shims/rdebug-ide",
"args": [
"server"
]
}
]
}
- Note: How to find the path, we can use this command
which ruby
which rdebug-ide
which bundle