.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": "(rdbg) RSpec - active spec file only",
"request": "launch",
"script": "${file}",
"command": "${workspaceRoot}/bin/rspec",
"env": {
"RAILS_ENV": "test",
// "RUBY_DEBUG_DAP_SHOW_PROTOCOL": 1
}
},
{
"type": "rdbg",
"name": "(rdbg) RSpec - active spec file only, with name filter",
"request": "launch",
"script": "${file}",
"args": [
"-e",
"${input:rspecNameFilter}",
],
"command": "${workspaceRoot}/bin/rspec",
"env": {
"RAILS_ENV": "test",
// "RUBY_DEBUG_DAP_SHOW_PROTOCOL": 1
}
},
// {
// "name": "(Ruby) RSpec - active spec file only",
// "type": "Ruby",
// "request": "launch",
// "program": "${workspaceRoot}/bin/rspec",
// "args": [
// "-I",
// "${workspaceRoot}",
// "${file}"
// ],
// "env": {
// "RAILS_ENV": "test"
// }
// },
// {
// "name": "(ruby-debug) RSpec - all",
// "type": "ruby-debug",
// "request": "launch",
// "program": "${workspaceRoot}/bin/rspec",
// "programArgs": [
// "-I",
// "${workspaceRoot}"
// ],
// "env": {
// "RAILS_ENV": "test"
// }
// },
// {
// "name": "(ruby-debug) RSpec - current file",
// "type": "ruby-debug",
// "request": "launch",
// "internalConsoleOptions": "openOnSessionStart",
// "useBundler": true,
// "program": "${workspaceRoot}/bin/rspec",
// "programArgs": [
// "-I",
// "${workspaceRoot}",
// "${file}",
// ],
// "env": {
// "RAILS_ENV": "test",
// "DEBUGGER_HOST": "0.0.0.0"
// },
// },
// {
// "name": "(ruby-debug) RSpec - current file, line number",
// "type": "ruby-debug",
// "request": "launch",
// "internalConsoleOptions": "openOnSessionStart",
// "useBundler": true,
// "program": "${workspaceRoot}/bin/rspec",
// "programArgs": [
// "-I",
// "${workspaceRoot}",
// "${file}:${input:rspecLineNumber}",
// ],
// "env": {
// "RAILS_ENV": "test",
// "DEBUGGER_HOST": "0.0.0.0"
// }
// },
// {
// "name": "(ruby-debug) RSpec - current file, name filter",
// "type": "ruby-debug",
// "request": "launch",
// "internalConsoleOptions": "openOnSessionStart",
// "useBundler": true,
// "program": "${workspaceRoot}/bin/rspec",
// "programArgs": [
// "-I",
// "${workspaceRoot}",
// "-e",
// "${input:rspecNameFilter}",
// "${file}",
// ],
// "env": {
// "RAILS_ENV": "test",
// "DEBUGGER_HOST": "0.0.0.0"
// }
// },
// {
// "name": "(ruby-debug) RSpec - current file, tag filter",
// "type": "ruby-debug",
// "request": "launch",
// "internalConsoleOptions": "openOnSessionStart",
// "useBundler": true,
// "program": "${workspaceRoot}/bin/rspec",
// "programArgs": [
// "-I",
// "${workspaceRoot}",
// "-t",
// "${input:rspecTagFilter}",
// "${file}",
// ],
// "env": {
// "RAILS_ENV": "test",
// "DEBUGGER_HOST": "0.0.0.0"
// }
// },
// {
// "name": "(ruby-debug) RSpec - specific spec in active file only",
// "type": "ruby-debug",
// "request": "launch",
// "program": "${workspaceRoot}/bin/rspec",
// "programArgs": [
// "-I",
// "${workspaceRoot}",
// "${file}[${input:rspecSpecId}]"
// ],
// "env": {
// "RAILS_ENV": "test"
// },
// },
// {
// "name": "(ruby-debug) RSpec - docs generation",
// "type": "ruby-debug",
// "request": "launch",
// "program": "${workspaceRoot}/bin/rspec",
// "programArgs": [
// "-I",
// "${workspaceRoot}",
// "--pattern",
// "spec/api/**/*_spec.rb",
// "--format",
// "Rswag::Specs::SwaggerFormatter",
// "--order",
// "defined"
// ],
// "env": {
// "RAILS_ENV": "test"
// },
// },
// {
// "name": "Rruby-debug server",
// "type": "ruby-debug",
// "request": "launch",
// "program": "${workspaceRoot}/bin/rails",
// "programArgs": [
// "server",
// "--binding=0.0.0.0",
// // had issues using passenger and setting breakpoints. Trialling thin for debugging
// "-u",
// "thin"
// ],
// "env": {
// "RAILS_ENV": "development"
// },
// // "postDebugTask": {
// // "task": "Stop Passenger",
// // "type": "shell"
// // },
// },
// {
// "name": "(Ruby) for rdebug-ide",
// "type": "Ruby",
// "request": "attach",
// "remoteHost": "127.0.0.1",
// "remotePort": "1234",
// "remoteWorkspaceRoot": "${workspaceRoot}",
// "cwd": "${workspaceRoot}"
// },
// {
// "name": "(Ruby) for rdebug-ide (workers)",
// "type": "Ruby",
// "request": "attach",
// "remoteHost": "workers",
// "remotePort": "1235",
// "remoteWorkspaceRoot": "${workspaceRoot}",
// "cwd": "${workspaceRoot",
// },
// {
// "name": "(Ruby) for rdebug-ide (workers_test)",
// "type": "Ruby",
// "request": "attach",
// "remoteHost": "workers_test",
// "remotePort": "1236",
// "remoteWorkspaceRoot": "${workspaceRoot}",
// "cwd": "${workspaceRoot}",
// },
],
"inputs": [
{
"id": "rspecSpecprogramArgs",
"type": "promptString",
"description": "Enter the rspec command line arguments",
"default": "spec"
},
{
"id": "rspecSpecId",
"type": "promptString",
"description": "Enter the rspec spec ID (without square braces). E.g. `1:3:5:1:1`",
"default": "1"
},
{
"id": "rspecLineNumber",
"type": "promptString",
"description": "Enter the line number to focus on",
"default": "1"
},
{
"id": "rspecNameFilter",
"type": "promptString",
"description": "Enter a fragment of the spec name to filter on",
"default": ""
},
{
"id": "rspecTagFilter",
"type": "promptString",
"description": "Enter a tag to filter on",
"default": ""
}
]
}