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

Ruby gem 'byebug 5.0.0' failing on install due to make error

I'm attempting to install the byebug gem v5.0.0 in a ubuntu environment. The v 5.0.0 is a project requirement, I can not use a newer version. These are the current versions that I am using bundle -v Bundler version 2.1.4 ruby -v ruby 2.7.0p0…
MKUltra
  • 349
  • 2
  • 14
0
votes
1 answer

I'm trying to instal ruby on rails but it tells me I haven't installed gem byebug 11.0.1 but I have it installed?

I'm trying to install Ruby on Rails on a Windows 7 machine. I followed the instructions at http://installrails.com/. I tried to run server and it said to run bundle install to install missing turbolinks gem. I could not find gem 'turbolinks <~> 5>…
Sagick
  • 317
  • 2
  • 6
  • 20
0
votes
0 answers

How can I debug a dynamically defined method with Ruby? (method created within repl session)

Is it possible to debug dynamically defined method in Ruby? If so, how can I achieve it? So I opened a new Pry session and first tried it like this: require "byebug" def hello(x) byebug x += 1 puts x end hello(5) It shouted at me with "***…
Bo Yi
  • 123
  • 1
  • 9
0
votes
0 answers

Failed to build byebug native gem extension

I literally looked everywhere and couldnt find an answer to it. I installed ruby on my windows with the installer they proviude on their website. Yes, i am running it on a 64 bit which is what my devkit is on. idk what to do i literally looke…
0
votes
2 answers

In ruby, I can't get byebug to work with selenium

require 'selenium-webdriver' require 'byebug' byebug driver = Selenium::WebDriver.for:chrome driver.navigate.to "http://google.com" puts driver.find_element(:tag_name, 'input'); puts driver.find_element(:name, 'q'); driver.find_element(:name,…
barlop
  • 12,887
  • 8
  • 80
  • 109
0
votes
1 answer

Byebug does not update local variable on Ubuntu

Here's my code: # please_just_work.rb require 'bundler/setup' Bundler.require byebug puts "a = #{a}" Inside the byebug session I set the value of a, but it remains undefined: [1, 5] in /home/paper/tmp/debug.rb 1: require 'bundler/setup' 2:…
FloatingRock
  • 6,741
  • 6
  • 42
  • 75
0
votes
0 answers

Execute a command when a bash script is not responding?

Here's my situation: I've made a script in a while loop, but sometimes (say after 20-30 loops) it stops unexpectedly. I tried to debug it but I couldn't. I noticed that it stops while executing a command, and it just doesn't do anything when it…
0
votes
2 answers

Starting Byebug with a block

I'm wondering if it's possible to start a Byebug session giving a starting point from a Rails console. I know I can insert a byebug statement wherever I want and start debugging, but I'd like to do something like this: Byebug.start do # entry…
Matias
  • 575
  • 5
  • 17
0
votes
1 answer

similar to gem byebug for coffescript

Is there any similar tool to ruby gem byebug for coffescript? I'd like to be able to stop the JS code and check variables' values/statuses (e.g. data, etc)
0
votes
2 answers

byebug: break on output to console

I have some code (a Rails app) that generates output to console. I'd like to use byebug to get the location of whatever is generating that output. Is there a way to do that?
RalphShnelvar
  • 557
  • 1
  • 6
  • 17
0
votes
1 answer

Using bye bug on Heroku

I have a simple Sinatra application. When I launch it (rackup) locally, and I place a byebug breakpoint, then I can see and interact with bye bug when that spot is reached in the code. When I deploy that same app on heroku, I have problems: Using…
pitosalas
  • 10,286
  • 12
  • 72
  • 120
0
votes
1 answer

Errno::EACCES: Permission denied - /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-16/2.0.0/sqlite3-1.3.12/gem_make.out

I've been trying to start a new project of mine, but I had some issues using Rails. I start by saying that I'm using macOS Sierra 10.12 and Xcode version 8.0 (8A218a). When I write in the designed directory rails new projectname it happens as…
Benny
  • 97
  • 2
  • 14
0
votes
1 answer

Automatically step through with Byebug based on rule

I'm using Byebug to debug my rails application. Currently I'm using step to trace the program as it executes. I'm not interested in tracing execution through every single line of third-party libraries, I only want to step through my code…
NateW
  • 2,101
  • 3
  • 28
  • 37
0
votes
1 answer

Error message when running "rails new myapp" command with byebug

when making a new ruby on rails app via my terminal, by the command "rails new newapp" I find the following error message in my terminal. It seems linked difficulties with installing bye bug 9.0.5. After a while the terminal says it can not succeed…
Nikita
  • 155
  • 14
0
votes
1 answer

Got failure in integration testing of rails

I was developing sample project of Rails tutorial (M. Hartl) but at the end of chapter 9 I got failure for integration testing. Assertion of test is like below: assert_select 'a[href=?]', user_path(user), text: user.name Body of error…
Mehdi Hosseinzadeh
  • 1,160
  • 11
  • 25