Created
May 6, 2024 03:12
-
-
Save ashgkwd/d780292adad56b44150d6d558444d141 to your computer and use it in GitHub Desktop.
VS Code launch.json for Rails app debugging with ruby_lsp
This file contains 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": [ | |
{ | |
"type": "ruby_lsp", | |
"name": "Rails", | |
"request": "launch", | |
"program": "${workspaceRoot}/bin/rails s", | |
"env": { | |
"RAILS_ENV": "development" | |
} | |
}, | |
{ | |
"type": "ruby_lsp", | |
"name": "Debug script", | |
"request": "launch", | |
"program": "ruby ${file}" | |
} | |
] | |
} |
A complete article is coming on ashgaikwad.substack.com
💡 Subscribe now to receive it in your inbox for free!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Once you create this file in your project, press F5 to start the debug. You can enable capture Runtime Exceptions or all exceptions. Also, you can manually add breakpoints (red dot on right side of line number)