Wednesday, September 14, 2011

When debugging in python, I use ipython's ipdb debugger to set breakpoints. I can add the following code in the location I want to stop:
import ipdb; ipdb.set_trace()
I wanted something similar for ruby. I got the same behaviour set up with the following code and patching using irb_completion's output. Install the required gem files:
gem install ruby-debug-base
gem install ruby-debug
gem install wirble
gem install patch_irb_completion;patch_irb_completion
Modify the ruby file to be debugged:
require 'rubygems'
require 'ruby-debug'
require 'wirble'
Wirble.init
Wirble.colorize

debugger #location to stop
running the code with the --debug option will stop at the requested location and drop an rdb prompt with tab completion. Reference: http://stackoverflow.com/questions/2504515/what-do-i-put-in-my-ruby-jruby-code-to-break-into-the-debugger http://www.unboxedconsulting.com/blog/irc-completion-from-the-debugger

1 comment:

Anonymous said...

Then a ballot initiative from DraftKings and FanDuel — framed as a boon to varsities in a parallel to the homelessness-focused California effort — failed to assemble sufficient signatures. The Seminole Tribe responded by working an advert that was somewhere between a victory lap and a dunk on the platforms. A legislative analysis stated residents illegally wagered roughly $18.7 billion in 2016, primarily based on an American Gaming Association estimate. The prospect of that sort of revenue has galvanized California gamers to try to control the nascent market. Tribal pursuits blocked a legislative proposal backed by professional sports activities leagues 바카라사이트 and non-tribal playing pursuits as state lawmakers in 2020 tried to forge a deal.