Questions tagged [ruby-debug]

The purpose of a debugger ruby-debug is to allow you to see what is going on “inside” a Ruby program while it executes.

The purpose of a debugger ruby-debug is to allow you to see what is going on “inside” a Ruby program while it executes.

It can do four main kinds of things (plus other things in support of these) to help you catch bugs in the act:

  • Start your script, specifying anything that might affect its behavior.
  • Make your script stop on specified conditions.
  • Examine what has happened, when your script has stopped.
  • Change things in your script, so you can experiment with correcting the effects of one bug and go on to learn about another.

Link

Related tag

152 questions
4
votes
6 answers

Ruby-debug not working

I can't get the server to start in debugging mode: even though I have all of the correct gems installed, the server refuses to start. $ gem install ruby-debug ERROR: Error installing ruby-debug: rbx-require-relative requires Ruby version ~>…
David
  • 263
  • 2
  • 5
  • 15
4
votes
1 answer

Default to "autolist on" in ruby debugger

Is there a way to set up certain defaults in the debugger? I'm not finding a way to do this..
Jeremy Smith
  • 14,727
  • 19
  • 67
  • 114
4
votes
1 answer

Ruby-debug color?

For the people who use ruby-debug, do you do anything to get it to output in color? I'm setting up wirble right now to colorize my irb, but it's not going to colorize pretty print (which, I believe comes from ruby-debug instead of irb)
Eric Hu
  • 18,048
  • 9
  • 51
  • 67
4
votes
1 answer

How to debug a plugin / gem? (with useful notes to setup and use ruby-debug gem)

Is there a way like how we debug models / controllers with logger.debug? Or even a better method? Thank you! Edit 1 Using ruby-debug seems like a steep learning curve for me, could anyone point me something similar to logger.debug, perhaps? Edit…
jaycode
  • 2,926
  • 5
  • 35
  • 71
4
votes
4 answers

How can I get ruby-debug-ide to work?

I can't get my ruby-debug-ide to work properly. I have a basic rails app, and I would like to debug in RubyMine. Before I even start RubyMine, I need to enable rdebug-ide in my vagrant VM. When I navigate to my project directory, I have read online…
KevEllis
  • 143
  • 1
  • 1
  • 5
4
votes
3 answers

RVM + Ruby 1.9.1 + ruby-debug = error?

I am trying to get a decent navigation between my methods in TextMate. I would love to have a list of them in a drawer, but I guess there is no such solution yet, right? Therefore I am trying to set up RubyAMP to work with Ruby 1.9.1-p378 installed…
Andrei
  • 10,918
  • 12
  • 76
  • 110
4
votes
1 answer

Ruby/Rails Debugging: Break when a value of an object/variable changes

In Ruby on Rails while debugging is there any way where we can ask the debugger to break the execution as soon as a value at specific memory location or the value of a variable/object changes ?
Kinaan Khan Sherwani
  • 1,504
  • 16
  • 28
4
votes
3 answers

How can I use ruby-debugger inside of a resque job?

I'm looking for a command to start a worker process so that inside of the job's perform method I can call debugger and have control thrown to the command prompt.
James
  • 5,273
  • 10
  • 51
  • 76
4
votes
1 answer

In Ruby debug, only step through application/project files and skip framework files?

I'm using pry-debugger with debugger. When stepping through the execution stack, I would like to skip over framework and library files and only view code in my project (a rails app). Is there a way to do this? Similar question here.
John Bachir
  • 22,495
  • 29
  • 154
  • 227
4
votes
1 answer

How can I get debug support in Aptana 3 with Ruby 1.9.3?

I am running with the following configuration: Windows XP Media Center Edition SP3 Aptana Studio 3, build: 3.0.9.201202141038 ruby 1.9.3p125 (2012-02-16) [i386-mingw32] (installed from rubyinstaller-1.9.3-p125.exe) DevKit (installed from…
Dangthrimble
  • 41
  • 1
  • 4
3
votes
3 answers

Cannot load ruby-debug in ruby 1.8.7 on a Mac OS X 10.7.3 Lion

Cannot load ruby-debug on a Mac OS X 10.7.3 Lion. Not sure why the path is incorrect. Ruby version is 1.8.7 which came standard with Lion. Installed Xcode Developer Information: Version: No version information available Location:…
phil
  • 193
  • 2
  • 12
3
votes
3 answers

Why my AptanaStudio3.0 can't debug Rails application?

I have Google this question for almost a whole day, but still not answer. My ruby version is 1.9.3 and Rails is 3.2.1, on a Mac 10.6 OS. now my gem list is: linecache19 (0.5.13) ruby-debug-base19 (0.11.26) ruby-debug-ide19 (0.4.12) ruby-debug19…
Chris
  • 6,431
  • 10
  • 44
  • 59
3
votes
2 answers

undefined params and session hashes in before_filter

Does anybody know why, when using ruby-debug by calling debugger in a method called as a before_filter, the params and session hashes are not defined? class MyExampleController < ActionController::Base before_filter :test_hashes def…
andi
  • 14,322
  • 9
  • 47
  • 46
3
votes
1 answer

How do I debug Ruby scripts using Aptana Studio 3 and rbenv?

I'm using aptana studio 3 in my mac, osx lion, and I'm using rbenv to install rubies, but when I try to run the debugger in aptana I always got this error: /Users/nebiros/.rbenv/shims/ruby: line 4: exec: rbenv: not found I already set some…
nebiros
  • 717
  • 10
  • 30
3
votes
1 answer

Why does the Rails Debugger not default to Autoreloading?

This drove me nuts for the longest time and I thought my rails s was not reloading my code when in fact the debugger was not reloading it. Then I found from this post that auto-reloading is not default. WHY NOT??? If you are debugging code, and you…
Jonathan Leung
  • 2,051
  • 2
  • 19
  • 24
1 2
3
10 11