I'm having the problem that byebug class are ignored after the first one. It's very strange.
I start the server. Whenever there is a byebug statement, if it is the first one since the server has started, it will work. If not, it will say this message: *** Byebug already started. Ignoring
byebugcall.
and the only way for the debugger to work would be to restart the server (and it will only work once).
Any help would be really appreciated.
BTW, this happens with every project.
Thanks.
Typing finish in the console exits byebug, without closing pry/rails console/rails server. Ctrl + D also works.
wherever you'd like the application to "break" - that is, executing byebug is equivalent to putting a breakpoint in your code. Run the program and use the debugger commands once you reach the breakpoint. near the end. Restart your server.
In order to start the Ruby debugger, load the debug library using the command-line option -r debug. The debugger stops before the first line of executable code and asks for the input of user commands.
Byebug is a Ruby 2 debugger. It's implemented using the Ruby 2 TracePoint C API for execution control and the Debug Inspector C API for call stack navigation. The core component provides support that front-ends can build on.
This has been reported and fixed, but isn't in a release yet.
To work around for now you update your Gemfile
with:
gem 'byebug', github: 'deivid-rodriguez/byebug', branch: 'master'
Then bundle update byebug
and restart your Rails server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With