Questions tagged [byebug]

Byebug is a simple to use, feature rich debugger for Ruby 2.0.

Byebug is a Ruby 2.0 debugger. It's implemented using the Ruby 2.0 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. It provides breakpoint handling and bindings for stack frames among other things and it comes with an easy to use command line interface.

When your code is behaving in unexpected ways, you can try printing to logs or the console to diagnose the problem. Unfortunately, there are times when this sort of error tracking is not effective in finding the root cause of a problem. When you actually need to journey into your running source code, the debugger is your best companion.

The debugger can also help you if you want to learn about the Rails source code but don't know where to start. Just debug any request to your application and use this guide to learn how to move from the code you have written deeper into Rails code.

Homepage

Guide

119 questions
0
votes
1 answer

Logging Filtered parameter in Byebug

I would like to know what would happen if I print out the value of a filtered parameters in byebug. Would it be [FILTER] or the actual value or an empty string. e.g. password and credit card fields I am getting empty string, so I'm not sure whether…
harinsa
  • 3,176
  • 5
  • 33
  • 53
0
votes
2 answers

byebug and ruby 2.2.3

When trying to use byebug for the first time with ruby 2.2.3 I get NameError: undefined local variable or method `byebug' I'm confused, here's are some diagnostics: ruby --version ruby 2.2.3p173 (2015-08-18 revision 51636)…
american-ninja-warrior
  • 7,397
  • 11
  • 46
  • 80
0
votes
1 answer

An error occurred while installing byebug (7.0.0), and bundler cannot continue

When I run bundle install, I get this error: In case the picture doesn't load, here is the error message: "An error occured while installing byebug (7.0.0), and bundler cannot continue." I found a few answers that suggested making changes to the…
Hunter Maxfield
  • 109
  • 1
  • 2
  • 10
0
votes
1 answer

Pry Remote / ByeBug next goes into Teardown

So I've decided to split my last post since the bug is Related to ByeBug more than to Pry-Remote (I think). Last post URL: Pry-Remote not triggered Rails 4 Problem: When typing Next in Pry-Remote, ByeBug acts unexpectedly and goes to "teardown".…
FastSolutions
  • 1,809
  • 1
  • 25
  • 49
0
votes
2 answers

Active Record Association CollectionProxy not working: why does @owner.@target.count yield a result of 1 when @owner.@target returns an empty array?

I have models in my Rails app: Sales_Opportunity which has_many Swots. I'm setting them up using FactoryGirl and running a test to show that when I delete my Sales_Opportunity I also cause the associated Swots to be deleted. For some reason when…
Zoinks10
  • 619
  • 6
  • 21
0
votes
2 answers

Debugging Ruby 2.2 with Eclipse

I'm trying to use step-through debugging in Ruby 2.2. I see that byebug is the debugger of choice for Ruby 2.x, but Eclipse doesn't appear to recognise it. Steps to reproduce: Do a fresh install of the Windows 64bit distrib of Ruby 2.2.2 (I'm using…
asinoladro
  • 182
  • 1
  • 11
0
votes
1 answer

Ruby byebug never stops

Ruby byebug never seems to stop in any of my code. It installed properly without errors. I did a bundle update byebug as well as gem pristine byebug. I start the rails server with this command rails s -e development Here's the gem file source…
user2974739
  • 619
  • 1
  • 7
  • 20
0
votes
1 answer

Ruby on Rails new app creation failing on Windows

I'm new to Ruby on Rails, and am trying to make an app. I ran rails new myApp, and it ran into a problem when installing byebug. Gem::Ext::BuildError: ERROR: Failed to build gem native extension. C:/Ruby21/bin/ruby.exe extconf.rb creating…
0
votes
2 answers

Rails4 - How to debug a user object?

How do I debug a user object? I am using byebug. I want to access the name attribute but I am getting the class name user. Kindly help Thanks [8, 17] in /home/ubuntu/workspace/converse/app/controllers/messages_controller.rb 8: end 9: …
New to Rails
  • 2,824
  • 5
  • 27
  • 43
0
votes
1 answer

Can't start WEBrick with Byebug on

When I try to run rails server, I get the following: bin/rails:6: warning: already initialized constant APP_PATH The only way I managed to start WEBrick is by commenting out gem 'byebug' in the Gemfile. At first I though it was Byebug's fault, but…
Fábio Queluci
  • 311
  • 1
  • 2
  • 15
-1
votes
1 answer

How to fix 'Failed to build gem native extension.' for several ruby packages?

I can't install ruby-debug-ide and byebug. The command: sudo gem install byebug Gives me this error: The command: sudo gem install ruby-debug-ide Gives me this error: And they both give me the same error: "Failed to build gem native…
Ivan Derlich
  • 655
  • 2
  • 9
  • 19
-1
votes
2 answers

In rails from byebug, how can I view the output of the session variable as a string, displaying only part of it?

In rails from byebug, how can I view the output of the session variable as a string, displaying only part of it? I can view the output of the session variable from the console but it is really long. If I could put that in a string and do e.g.…
barlop
  • 12,887
  • 8
  • 80
  • 109
-1
votes
2 answers

How do I show more surrounding code in byebug?

By default byebug shows 10 lines, e.g. lines [40, 49] How can I easily see some more surrounding code? For example lines 30-60
Daniel Garmoshka
  • 5,849
  • 39
  • 40
-3
votes
1 answer

Errors installing Rails on Mac with Yosemite

I've tried to install bye bug but am getting the following error: ERROR: While executing gem ... (Errno::EACCES) Permission denied @ dir_s_mkdir - ./../../extensions/x86_64-darwin-14/2.1.0-static/byebug-3.5.1 I am running Yosemite. Any help…
smacca01
  • 15
  • 3
1 2 3 4 5 6 7
8