Description
In this session we try to set up Rails debugging in VSCode. We didn't quite get there, but after the call Marco figured it out!
In .vscode/tasks.json :
{
"version": "2.0.0",
"tasks": [
{
"label": "start rdbg",
"type": "shell",
"command": "gdk stop rails-web && GITLAB_RAILS_RACK_TIMEOUT_ENABLE_LOGGING=false PUMA_SINGLE_MODE=true rdbg --open -c -- bin/rails s",
"isBackground": true,
"problemMatcher": {
"owner": "rails",
"pattern": {
"regexp": "^.*$",
},
"background": {
"activeOnStart": false,
"beginsPattern": "^(ok: down:).*$",
"endsPattern": "^(DEBUGGER: wait for debugger connection\\.\\.\\.)$"
}
}
}
]
}
In .vscode/launch.json :
{
// 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": [
{
"type": "rdbg",
"name": "Attach with rdbg",
"request": "attach",
"preLaunchTask": "start rdbg"
}
]
}
Before that:
run `gem install debug` from inside the gitlab folder