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

May 10, 2025 - 11:41
 0
VsCode Debugger for Ruby on Rails

Steps to Add debugger

  1. Install rdbg extention here.
  2. Create launch.json file in vscode.
  3. Add the given configuration to run the code
  4. [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