The previous version (for ruby 1.9) is here.
It seems ruby-debug has fallen out of favour with the community and the replacement is byebug.
So here's my follow-up on the old post.
The steps to enable byebugging in your app dev env:
It seems ruby-debug has fallen out of favour with the community and the replacement is byebug.
So here's my follow-up on the old post.
The steps to enable byebugging in your app dev env:
- echo export POW_WORKERS=1 >> ~/.powconfig # make sure pow runs only one app process — globally
- cd <your project directory>
- Add byebug to your bundle (and remove ruby-debug if exists).
- Paste the following snippet at the end of your config/environments/development.rb — for rails, or in the appropriate development environment initialisation module — for the platform of your choice:
- echo export RUBY_DEBUG_PORT=10007 >> .powenv # make sure we enable debugging with a machine-unique port, e.g. 10007 (you should pick different ports for different projects)
- touch tmp/restart.txtThen make any request to actually restart your server.
- byebug -R localhost:10007 -d # you're back in business, go wild with debugger's in your code