This week's book giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of Transfer Learning for Natural Language Processing (MEAP) and have Paul Azunre on-line!
See this thread for details.
Win a copy of Transfer Learning for Natural Language Processing (MEAP) this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

Ruby debugging methods - why add debugger code to my code?

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know a bit of Java and I have done some debugging here and there using only an IDE. But, ruby debugging seems quite odd to me.

It looks like there are many ways of debugging ruby code. One way is to insert the following lines before the buggy line in the code you are debugging. This is the BREAKPOINT IN SOURCE technique



Is this the best way to debug ? It seems so bad to me because I have to insert debugger at all desired breakpoints.

I used it like this - first run the code without debugger, find the line causing error, put the debug code before the line and then run the code again to debug it. Am I doing this correctly ?

Is it better to use Pry debugger instead of this ?
 
Mo-om! You're embarassing me! Can you just read a tiny ad like a normal person?
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic