VsCode Debugger for Ruby on Rails
Steps to Add debugger Install rdbg extention here. Create launch.json file in vscode. Add the given configuration to run the code [Optional] You can try this command also if this is working then it should run rdbg --open -n -c -- bundle exec rails s launch.json file for vscode { "version": "0.2.0", "configurations": [ { "type": "rdbg", "name": "Run rake test", "request": "launch", "command": "rake", "script": "test", "args": [], "askParameters": false }, { "type": "rdbg", "name": "Debug Rails server", "request": "launch", "command": "bin/rails", "script": "server", // Launch Rails server with debugger "args": ["-p", "3000"], // Optional: specify port "askParameters": false } ] } Details Reference https://www.youtube.com/watch?v=e_RKkgiimXE

Steps to Add debugger
- Install
rdbg
extention here. - Create
launch.json
file in vscode. - Add the given configuration to run the code
- [Optional] You can try this command also if this is working then it should run
rdbg --open -n -c -- bundle exec rails s
launch.json
file for vscode
{
"version": "0.2.0",
"configurations": [
{
"type": "rdbg",
"name": "Run rake test",
"request": "launch",
"command": "rake",
"script": "test",
"args": [],
"askParameters": false
},
{
"type": "rdbg",
"name": "Debug Rails server",
"request": "launch",
"command": "bin/rails",
"script": "server", // Launch Rails server with debugger
"args": ["-p", "3000"], // Optional: specify port
"askParameters": false
}
]
}