I've tried pry and remote-pry, but no luck. I'm familiar with logging, but I want to be able to step thru my code and look at variables.
Does anyone know of anything I can use to debug Sidekiq?
Invoking pry debugging To invoke the debugger, place binding. pry somewhere in your code. When the Ruby interpreter hits that code, execution stops, and you can type in commands to debug the state of the program.
Check in /var/log/gitlab/sidekiq/current or $GITLAB_HOME/log/sidekiq. log for the backtrace output. The backtraces are lengthy and generally start with several WARN level messages.
To run sidekiq, you will need to open a terminal, navigate to your application's directory, and start the sidekiq process, exactly as you would start a web server for the application itself. When the command executes you will see a message that sidekiq has started.
The best thing I've come up with is this gem gem 'pry-remote'
it works great and stops all processes from running. And it works like pry
just put in binding.remote_pry
and you've got a stopping point.
Workers are designed to be trivial to run. Put pry in your worker code and run it in the rails console.
> MyWorker.new.perform(some_args)
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