Skip to content
Snippets Groups Projects
Unverified Commit e94c3f6e authored by Sébastien Gaya's avatar Sébastien Gaya
Browse files

remote byebug to keep foreman clean

parent 87c8b14a
No related tags found
No related merge requests found
#!/usr/bin/env sh
port=8989
while getopts ":p:" opt; do
case ${opt} in
p)
port=$OPTARG
;;
:)
echo "Option -${OPTARG} requires an argument."
exit 1
;;
\?)
echo "Invalid option: -${OPTARG}"
exit 1
;;
esac
done
exec bundle exec byebug -R localhost:$port
\ No newline at end of file
if Rails.env.development?
require 'byebug/core'
begin
Byebug.start_server 'localhost', ENV.fetch('BYEBUG_SERVER_PORT', 8989).to_i
rescue Errno::EADDRINUSE
Rails.logger.debug 'Byebug server already running'
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment