A guide on Byebug exists here
Couple of useful links:
https://fleeblewidget.co.uk/2014/05/byebug-cheatsheet/
Tips:
Disappearing type!
At the moment it seems like the bash terminal can stop echoing your typing mid debug session. A simple workaround is to paste and enter this string, and the echoing will return:
`stty sane`
You can make this even easier by binding this to a key combo, e.g. here in VS Code:
[{"key": "ctrl+u",
"command": "workbench.action.terminal.sendSequence",
"args": { "text": "`stty sane`" }}]
(NB I don’t think this is yet possible in the new Windows Terminal app, though, but feel free to amend this statement!)
Reduce the splurge to terminal
Defeat SQL logging
Consider getting rid of the SQL logging using:
DISCOURSE_DEV_LOG_LEVEL=info
, so e.g.:
UNICORN_BIND_ALL=TRUE DISCOURSE_DEV_LOG_LEVEL=info bin/rails s
Reduce the number of Unicorns
Reduce the number of unicorns in unicorn.conf.rb
:
worker_processes (ENV["UNICORN_WORKERS"] || 1).to_i
(from usually 3 to 1)
Prevent Discourse retrying to send failed emails
Finally, stop the system repeatedly failing to send mail:
mailhog
Stop Controllers Timing out
Debugging controllers is a breeze with UNICORN_TIMEOUT
environment variable.