Last active
June 17, 2022 01:18
-
-
Save IliasDeros/58c73cad263468ec27b20005843f4b3b to your computer and use it in GitHub Desktop.
A Ruby on Rails + React developer's common VSCode debug configurations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Rails server", | |
"type": "Ruby", | |
"request": "launch", | |
"cwd": "${workspaceRoot}", | |
"program": "${workspaceRoot}/bin/rails", | |
"args": [ | |
"server" | |
], | |
"useBundler": true, | |
"pathToBundler": "${workspaceRoot}/bin/bundle", | |
"env": { | |
"WEB_CONCURRENCY": 0 | |
} | |
}, | |
{ | |
"name": "Rspec", | |
"type": "Ruby", | |
"request": "launch", | |
"cwd": "${workspaceRoot}", | |
"useBundler": true, | |
"debuggerPort": "1235", | |
"pathToBundler": "${workspaceRoot}/bin/bundle", | |
"program": "${workspaceRoot}/bin/rspec", | |
"args": [ | |
"${file}" | |
], | |
"env": { | |
"DISABLE_SPRING": 1 | |
} | |
}, | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Jest Test", | |
"program": "${workspaceFolder}/node_modules/jest/bin/jest", | |
"args": ["--ci", "${file}"], | |
"console": "integratedTerminal", | |
"internalConsoleOptions": "neverOpen", | |
"sourceMaps": true | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Source for
"WEB_CONCURRENCY": 0
- rubyide/vscode-ruby#426. Without it, the code may stop on a breakpoint while VSCode is listening to the debugger on a different thread, hanging the server without handling the breakpoint correctly in the IDE. Thank you @jonmchan!