+ All Categories
Home > Technology > Rubyslava debugging with_pry

Rubyslava debugging with_pry

Date post: 15-May-2015
Category:
Upload: olahmichal
View: 229 times
Download: 0 times
Share this document with a friend
Popular Tags:
18
Debugging with Pry Michal Oláh @michalolah @bonetics
Transcript
Page 1: Rubyslava debugging with_pry

Debugging with PryMichal Oláh @michalolah @bonetics

Page 2: Rubyslava debugging with_pry

Progammers spend 60% of their time debugging

We should pay attention to our workflow

Page 3: Rubyslava debugging with_pry
Page 4: Rubyslava debugging with_pry

“There are no fully fledged IDEs for Ruby on Rails…”

–Agile Web Development with Rails

-July 2009

Page 5: Rubyslava debugging with_pry

WTF

Page 6: Rubyslava debugging with_pry

WTF?

Page 7: Rubyslava debugging with_pry

WTF?!

Page 8: Rubyslava debugging with_pry

Actually its not that bad

Page 9: Rubyslava debugging with_pry

we have tests after all

Page 10: Rubyslava debugging with_pry

And puts is a powerfull thing

Page 11: Rubyslava debugging with_pry

But what if you meet this guy?

Page 12: Rubyslava debugging with_pry
Page 13: Rubyslava debugging with_pry

binding.pry play

whereami edit -c

exit ls cd

next, previous, skip, breakpoint (debugger)

Commands !

Page 14: Rubyslava debugging with_pry

Demo 1 !

• debugging integration tests

!

• fast feedback of what works and what doesn’t

Page 15: Rubyslava debugging with_pry

Demo 2 !

• debugging controller action !

• ls, cd !

• inplace code edit and debug with breakpoints !

• edit, breakpoint, whereami, wtf?! !

• debugging with pry-rescue

Page 16: Rubyslava debugging with_pry
Page 17: Rubyslava debugging with_pry

• pry-debugger (MRI 1.8-1.9) • pry-byebug (MRI 2.0+) • pry-rescue - resque from exceptions in to a pry

session • plymounth - jump into a pry session on test failure • pry-rails • help command • pry custom commands

Plugins and features

Page 18: Rubyslava debugging with_pry

Resources

• http://pryrepl.org

• http://gaslight.co/blog/i-like-pry-but-dot-dot-dot

• http://railscasts.com/episodes/280-pry-with-rails

• http://www.youtube.com/watch?v=o90CCPjcIKE

• https://github.com/m1k3/rubyslava_pry_demo


Recommended