Date post: | 15-May-2015 |
Category: |
Technology |
Upload: | olahmichal |
View: | 229 times |
Download: | 0 times |
Debugging with PryMichal Oláh @michalolah @bonetics
Progammers spend 60% of their time debugging
We should pay attention to our workflow
“There are no fully fledged IDEs for Ruby on Rails…”
–Agile Web Development with Rails
-July 2009
WTF
WTF?
WTF?!
Actually its not that bad
we have tests after all
And puts is a powerfull thing
But what if you meet this guy?
binding.pry play
whereami edit -c
exit ls cd
next, previous, skip, breakpoint (debugger)
Commands !
Demo 1 !
• debugging integration tests
!
• fast feedback of what works and what doesn’t
Demo 2 !
• debugging controller action !
• ls, cd !
• inplace code edit and debug with breakpoints !
• edit, breakpoint, whereami, wtf?! !
• debugging with pry-rescue
• 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
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