SlideShare a Scribd company logo
1 of 18
Download to read offline
Debugging with Pry
Michal 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?
Commands
!

binding.pry
play
whereami
edit -c
exit
ls
cd
next, previous, skip, breakpoint (debugger)
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
Plugins and features
•

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
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

More Related Content

What's hot

Bsu on rails_testing
Bsu on rails_testingBsu on rails_testing
Bsu on rails_testing
Pavel Shutin
 
WTF TDD?
WTF TDD?WTF TDD?
WTF TDD?
jeremyw
 
Keeping your users happy with testable apps - Greg Shackles
Keeping your users happy with testable apps - Greg ShacklesKeeping your users happy with testable apps - Greg Shackles
Keeping your users happy with testable apps - Greg Shackles
Xamarin
 
'IS THERE JAVASCRIPT ON SWAGGER PLUGINS?' by Dmytro Gusev
'IS THERE JAVASCRIPT ON SWAGGER PLUGINS?' by  Dmytro Gusev'IS THERE JAVASCRIPT ON SWAGGER PLUGINS?' by  Dmytro Gusev
'IS THERE JAVASCRIPT ON SWAGGER PLUGINS?' by Dmytro Gusev
OdessaJS Conf
 

What's hot (20)

team++; making your team work better together
team++; making your team work better togetherteam++; making your team work better together
team++; making your team work better together
 
Bsu on rails_testing
Bsu on rails_testingBsu on rails_testing
Bsu on rails_testing
 
WTF TDD?
WTF TDD?WTF TDD?
WTF TDD?
 
Testing Pyramid
Testing PyramidTesting Pyramid
Testing Pyramid
 
Building a PWA with Ionic, Angular and Spring Boot - Jfokus 2017
Building a PWA with Ionic, Angular and Spring Boot - Jfokus 2017Building a PWA with Ionic, Angular and Spring Boot - Jfokus 2017
Building a PWA with Ionic, Angular and Spring Boot - Jfokus 2017
 
Lrug
LrugLrug
Lrug
 
Patterns and antipatterns in Docker image lifecycle as was presented at Globa...
Patterns and antipatterns in Docker image lifecycle as was presented at Globa...Patterns and antipatterns in Docker image lifecycle as was presented at Globa...
Patterns and antipatterns in Docker image lifecycle as was presented at Globa...
 
Patterns and antipatterns in Docker image lifecycle as was presented at Scale...
Patterns and antipatterns in Docker image lifecycle as was presented at Scale...Patterns and antipatterns in Docker image lifecycle as was presented at Scale...
Patterns and antipatterns in Docker image lifecycle as was presented at Scale...
 
Keeping your users happy with testable apps - Greg Shackles
Keeping your users happy with testable apps - Greg ShacklesKeeping your users happy with testable apps - Greg Shackles
Keeping your users happy with testable apps - Greg Shackles
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevOps Detroit...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevOps Detroit...DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevOps Detroit...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevOps Detroit...
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Devoxx 2017
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Devoxx 2017DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Devoxx 2017
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Devoxx 2017
 
Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)
 
TDD on android. Why and How? (Coding Serbia 2019)
TDD on android. Why and How? (Coding Serbia 2019)TDD on android. Why and How? (Coding Serbia 2019)
TDD on android. Why and How? (Coding Serbia 2019)
 
Chaos Engineering Talk at DevOps Days Austin
Chaos Engineering Talk at DevOps Days AustinChaos Engineering Talk at DevOps Days Austin
Chaos Engineering Talk at DevOps Days Austin
 
Joel Arvidsson, Klarna. What You See is What You Get – a case for visual testing
Joel Arvidsson, Klarna. What You See is What You Get – a case for visual testingJoel Arvidsson, Klarna. What You See is What You Get – a case for visual testing
Joel Arvidsson, Klarna. What You See is What You Get – a case for visual testing
 
PSPDFKit on Android
PSPDFKit on AndroidPSPDFKit on Android
PSPDFKit on Android
 
Hacking on gems
Hacking on gemsHacking on gems
Hacking on gems
 
'IS THERE JAVASCRIPT ON SWAGGER PLUGINS?' by Dmytro Gusev
'IS THERE JAVASCRIPT ON SWAGGER PLUGINS?' by  Dmytro Gusev'IS THERE JAVASCRIPT ON SWAGGER PLUGINS?' by  Dmytro Gusev
'IS THERE JAVASCRIPT ON SWAGGER PLUGINS?' by Dmytro Gusev
 
Burp better - Finding Struts and XXE Vulns with Burp Extensions
Burp better - Finding Struts and XXE Vulns with Burp ExtensionsBurp better - Finding Struts and XXE Vulns with Burp Extensions
Burp better - Finding Struts and XXE Vulns with Burp Extensions
 
Solving Cross-Cutting Concerns in PHP - DutchPHP Conference 2016
Solving Cross-Cutting Concerns in PHP - DutchPHP Conference 2016 Solving Cross-Cutting Concerns in PHP - DutchPHP Conference 2016
Solving Cross-Cutting Concerns in PHP - DutchPHP Conference 2016
 

Viewers also liked

Are Automated Debugging Techniques Actually Helping Programmers
Are Automated Debugging Techniques Actually Helping ProgrammersAre Automated Debugging Techniques Actually Helping Programmers
Are Automated Debugging Techniques Actually Helping Programmers
Chris Parnin
 
Debugging Rails 3 Applications
Debugging Rails 3 ApplicationsDebugging Rails 3 Applications
Debugging Rails 3 Applications
Nathan Broadbent
 
CDFA Annual VC Report for 2013
CDFA Annual VC Report for 2013CDFA Annual VC Report for 2013
CDFA Annual VC Report for 2013
Logan Dawson
 
Financing_Contamination_Remediation_FinalReport
Financing_Contamination_Remediation_FinalReportFinancing_Contamination_Remediation_FinalReport
Financing_Contamination_Remediation_FinalReport
Logan Dawson
 
Eb 14 15 application process
Eb 14 15 application processEb 14 15 application process
Eb 14 15 application process
Foo Fonsey
 
(Pdf) yury chemerkin def_con_2013
(Pdf) yury chemerkin def_con_2013(Pdf) yury chemerkin def_con_2013
(Pdf) yury chemerkin def_con_2013
STO STRATEGY
 
(Pdf) yury chemerkin _ath_con_2013
(Pdf) yury chemerkin _ath_con_2013(Pdf) yury chemerkin _ath_con_2013
(Pdf) yury chemerkin _ath_con_2013
STO STRATEGY
 
AIESEC in SIM 14/15 Team Leaders & Team Members Application
AIESEC in SIM 14/15 Team Leaders & Team Members ApplicationAIESEC in SIM 14/15 Team Leaders & Team Members Application
AIESEC in SIM 14/15 Team Leaders & Team Members Application
Foo Fonsey
 
2014-geothermal-opportunities-usa
2014-geothermal-opportunities-usa2014-geothermal-opportunities-usa
2014-geothermal-opportunities-usa
Gretchen Heberling
 

Viewers also liked (19)

Are Automated Debugging Techniques Actually Helping Programmers
Are Automated Debugging Techniques Actually Helping ProgrammersAre Automated Debugging Techniques Actually Helping Programmers
Are Automated Debugging Techniques Actually Helping Programmers
 
Debugging Rails 3 Applications
Debugging Rails 3 ApplicationsDebugging Rails 3 Applications
Debugging Rails 3 Applications
 
CDFA Annual VC Report for 2013
CDFA Annual VC Report for 2013CDFA Annual VC Report for 2013
CDFA Annual VC Report for 2013
 
Rubyslava beyond the_monolith
Rubyslava beyond the_monolithRubyslava beyond the_monolith
Rubyslava beyond the_monolith
 
Financing_Contamination_Remediation_FinalReport
Financing_Contamination_Remediation_FinalReportFinancing_Contamination_Remediation_FinalReport
Financing_Contamination_Remediation_FinalReport
 
Debugging application using visual studio 2010 and intellitrace
Debugging application using visual studio 2010 and intellitraceDebugging application using visual studio 2010 and intellitrace
Debugging application using visual studio 2010 and intellitrace
 
Eb 14 15 application process
Eb 14 15 application processEb 14 15 application process
Eb 14 15 application process
 
Django debugging
Django debuggingDjango debugging
Django debugging
 
(Pdf) yury chemerkin def_con_2013
(Pdf) yury chemerkin def_con_2013(Pdf) yury chemerkin def_con_2013
(Pdf) yury chemerkin def_con_2013
 
AP_2015_AIESEC in SIM_AP Achievement Awards
AP_2015_AIESEC in SIM_AP Achievement AwardsAP_2015_AIESEC in SIM_AP Achievement Awards
AP_2015_AIESEC in SIM_AP Achievement Awards
 
(Pdf) yury chemerkin _ath_con_2013
(Pdf) yury chemerkin _ath_con_2013(Pdf) yury chemerkin _ath_con_2013
(Pdf) yury chemerkin _ath_con_2013
 
Node.js debugging
Node.js debuggingNode.js debugging
Node.js debugging
 
Debugging Debugging
Debugging DebuggingDebugging Debugging
Debugging Debugging
 
Principles in software debugging
Principles in software debuggingPrinciples in software debugging
Principles in software debugging
 
AIESEC in SIM 14/15 Team Leaders & Team Members Application
AIESEC in SIM 14/15 Team Leaders & Team Members ApplicationAIESEC in SIM 14/15 Team Leaders & Team Members Application
AIESEC in SIM 14/15 Team Leaders & Team Members Application
 
Debugging (Django) application in PyCharm
Debugging (Django) application in PyCharmDebugging (Django) application in PyCharm
Debugging (Django) application in PyCharm
 
Myanmar's Politics, Economy, and Government
Myanmar's Politics, Economy, and GovernmentMyanmar's Politics, Economy, and Government
Myanmar's Politics, Economy, and Government
 
2014-geothermal-opportunities-usa
2014-geothermal-opportunities-usa2014-geothermal-opportunities-usa
2014-geothermal-opportunities-usa
 
Cambios físicos y químicos - Mora Arguelles
Cambios físicos y químicos - Mora ArguellesCambios físicos y químicos - Mora Arguelles
Cambios físicos y químicos - Mora Arguelles
 

Similar to Rubyslava debugging with_pry

Waterfalls for Agile in a bag
Waterfalls for Agile in a bagWaterfalls for Agile in a bag
Waterfalls for Agile in a bag
Steve Wells
 
Dev ops lessons learned - Michael Collins
Dev ops lessons learned  - Michael CollinsDev ops lessons learned  - Michael Collins
Dev ops lessons learned - Michael Collins
Devopsdays
 
Fighting Ruby code smell
Fighting Ruby code smellFighting Ruby code smell
Fighting Ruby code smell
olegshpynov
 

Similar to Rubyslava debugging with_pry (20)

Hangout Utche #6. "Rambovidnaya problema"
Hangout Utche #6. "Rambovidnaya problema"Hangout Utche #6. "Rambovidnaya problema"
Hangout Utche #6. "Rambovidnaya problema"
 
CI doesn’t start with Jenkins
CI doesn’t start with JenkinsCI doesn’t start with Jenkins
CI doesn’t start with Jenkins
 
Waterfalls for Agile in a bag
Waterfalls for Agile in a bagWaterfalls for Agile in a bag
Waterfalls for Agile in a bag
 
Waterfalls for agile cambridge
Waterfalls for agile cambridgeWaterfalls for agile cambridge
Waterfalls for agile cambridge
 
Battle for Code Quality - A Story of One Java Project
Battle for Code Quality - A Story of One Java ProjectBattle for Code Quality - A Story of One Java Project
Battle for Code Quality - A Story of One Java Project
 
Surviving SOA - delivering (somewhat) continuously on a hostile planet
Surviving SOA - delivering (somewhat) continuously on a hostile planetSurviving SOA - delivering (somewhat) continuously on a hostile planet
Surviving SOA - delivering (somewhat) continuously on a hostile planet
 
Surviving SOA
Surviving SOASurviving SOA
Surviving SOA
 
Quality at Speed - Penny Wyatt
Quality at Speed - Penny WyattQuality at Speed - Penny Wyatt
Quality at Speed - Penny Wyatt
 
Conquering AngularJS Limitations
Conquering AngularJS LimitationsConquering AngularJS Limitations
Conquering AngularJS Limitations
 
Conquering AngularJS Limitations
Conquering AngularJS LimitationsConquering AngularJS Limitations
Conquering AngularJS Limitations
 
Dev ops lessons learned - Michael Collins
Dev ops lessons learned  - Michael CollinsDev ops lessons learned  - Michael Collins
Dev ops lessons learned - Michael Collins
 
Fighting Ruby code smell
Fighting Ruby code smellFighting Ruby code smell
Fighting Ruby code smell
 
React, London JS Meetup, 11 Aug 2015
React, London JS Meetup, 11 Aug 2015React, London JS Meetup, 11 Aug 2015
React, London JS Meetup, 11 Aug 2015
 
Ruby codebases in an entropic universe
Ruby codebases in an entropic universeRuby codebases in an entropic universe
Ruby codebases in an entropic universe
 
Deploying 3 times a day without a downtime @ Rocket Tech Summit in Berlin
Deploying 3 times a day without a downtime @ Rocket Tech Summit in BerlinDeploying 3 times a day without a downtime @ Rocket Tech Summit in Berlin
Deploying 3 times a day without a downtime @ Rocket Tech Summit in Berlin
 
Test Driven Development - Workshop
Test Driven Development - WorkshopTest Driven Development - Workshop
Test Driven Development - Workshop
 
My Little Webap - DevOpsSec is Magic
My Little Webap - DevOpsSec is MagicMy Little Webap - DevOpsSec is Magic
My Little Webap - DevOpsSec is Magic
 
6 reasons Jubilee could be a Rubyist's new best friend
6 reasons Jubilee could be a Rubyist's new best friend6 reasons Jubilee could be a Rubyist's new best friend
6 reasons Jubilee could be a Rubyist's new best friend
 
10+ Deploys Per Day: Dev and Ops Cooperation at Flickr
10+ Deploys Per Day: Dev and Ops Cooperation at Flickr10+ Deploys Per Day: Dev and Ops Cooperation at Flickr
10+ Deploys Per Day: Dev and Ops Cooperation at Flickr
 
Why You Should Be Fixing Bugs
Why You Should Be Fixing BugsWhy You Should Be Fixing Bugs
Why You Should Be Fixing Bugs
 

Recently uploaded

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Navigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern EnterpriseNavigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern Enterprise
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 

Rubyslava debugging with_pry