Checks
Describe your suggestion
This issue is for proposing content on debugging rails applications using rdbg.
By the time people will get to Ruby on Rails course they would already have an idea about debugging current ruby file using vscode and setting up launch.json configuration. (releated issue : #30210 )
- show how to run application as a remote debuggee:
- adding
require 'debug/open_nonstop' to top of config/environments/development.rb
- running -
rdbg --open --nonstop -c rails s
- show to how to attach the remote debugger console to the debuggee:
- create default
rdbg launch.json first.
- go to
Debug and Run Ctrl + Shift + D window in vscode and change debug current file with rdbg option to Attach with rdbg and click F5. (will automatically connect to the UNIX domain socket if only one is there)
- add breakpoints and open the site in browser
localhost:3000 and start debugging.
- show how to use TCP/IP:
rdbg --open --port=38698 -c rails s or set RUBY_DEBUG_PORT=38698 environment variable.
- setup
launch.json for using port.
- explain the options
-c, --open and --nonstop.
If you don't want to stop the program at the beginning, you can also use require 'debug/open_nonstop'. Using debug/open_nonstop is useful if you want to open a backdoor to the application. However, it is also dangerous because it can become another vulnerability. Please use it carefully.
No idea where we should introduce this lesson...maybe before deployment?
Path
Ruby / Rails
Lesson Url
https://www.theodinproject.com/lessons/ruby-on-rails-deployment
(Optional) Discord Name
No response
(Optional) Additional Comments
No response
Checks
Describe your suggestion
This issue is for proposing content on debugging
railsapplications usingrdbg.By the time people will get to
Ruby on Railscourse they would already have an idea about debuggingcurrent ruby fileusingvscodeand setting uplaunch.jsonconfiguration. (releated issue : #30210 )require 'debug/open_nonstop'to top ofconfig/environments/development.rbrdbg --open --nonstop -c rails srdbglaunch.jsonfirst.Debug and RunCtrl + Shift + D window invscodeand changedebug current file with rdbgoption toAttach with rdbgand click F5. (will automatically connect to the UNIX domain socket if only one is there)localhost:3000and start debugging.rdbg --open --port=38698 -c rails sor setRUBY_DEBUG_PORT=38698environment variable.launch.jsonfor using port.-c,--openand--nonstop.No idea where we should introduce this lesson...maybe before deployment?
Path
Ruby / Rails
Lesson Url
https://www.theodinproject.com/lessons/ruby-on-rails-deployment
(Optional) Discord Name
No response
(Optional) Additional Comments
No response