if you're backgrounding multiple services on the same host in
development (ex: pow) then byebug_server would not be able to bind and
would cause your canvas to barf when booting. this change makes it so
it'll auto-assign ports and it also updates the byebug-remote to just
connect to the last one that had started.
also only starts byebug server if REMOTE_DEBUGGING_ENABLED is set, which
will be default for canvas docker development environment.
Change-Id: I646209e6bec64777945c56c45a3db29b847eb159
Reviewed-on: https://gerrit.instructure.com/81260
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Ben Rinaca <brinaca@instructure.com>
QA-Review: Ben Rinaca <brinaca@instructure.com>
Using remote byebug means you don't have to alter the configuration of
your docker containers to get a byebug session. Also makes it possible
to byebug a running job.
This will only run byebug when the process is started outside of a TTY,
ex: in a docker container, so that we're sure we don't interfere with
byebug when running locally instead of in docker.
Also add some notes on how to use pry-remote if someone prefers pry over
byebug.
Change-Id: I38b4365ce2ab7536bf16548f26a37b951273b792
Reviewed-on: https://gerrit.instructure.com/80772
Reviewed-by: Mark Severson <markse@instructure.com>
Tested-by: Jenkins
Product-Review: Ben Rinaca <brinaca@instructure.com>
QA-Review: Ben Rinaca <brinaca@instructure.com>