SlideShare a Scribd company logo
1 of 32
Martin Skarsaune
Senior Developer and Co-Owner
@MSkarsaune
Debugging
Tricks
高
馬
丁
We’re
Hiring
Execution Order
• Code evaluation
• Controlling your steps and breaks
• Manipulating code flow
• Tracking classes and objects
• Ensuring WYSIWYG
• Debugging concurrent code
• Customizing the debugger
Frames + threads Variables Watches ?
Test
Results?
Console Display ?
Code
Frames + threads Test
Results?
Variables + watchesConsole
Code
1. Should you always launch in debug mode?
IMHO: Always Launch in
Debug Mode!
• Ability to halt and troubleshoot
• Threads
• Hot code replacement
• Consider launching externally
Excecution Order
• Code evaluation
• Controlling your steps and breaks
• Manipulating code flow
• Tracking classes and objects
• Ensuring WYSIWYG
• Debugging concurrent code
• Customizing the debugger
2. Evaluating Code
Step Out- Code Evaluation
• Both in Java editor and free form
• Nothing is private 
• Watches
• In breakpoints
• Nested evaluations / breaks
• Scrapbook
Execution Order
• Code evaluation
• Controlling your steps and breaks
• Manipulating code flow
• Tracking classes and objects
• Ensuring WYSIWYG
• Debugging concurrent code
• Customizing the debugger
3. Controlling your steps
and Breaks
Step OUt- Controlling your
steps and breaks
• Step filters
• Frame filters
• Smart stepping
• Lambda stepping and breakpoints
• Exception breakpoints
– Break after
Execution Order
• Code evaluation
• Controlling your steps and breaks
• Manipulating code flow
• Tracking classes and objects
• Ensuring WYSIWYG
• Debugging concurrent code
• Customizing the debugger
4. Manipulating Code
Flow
Step Out- Manipulating Flow
• Drop to frame
• Modify values – nothing is really final 
• Force return
Execution Order
• Code evaluation
• Controlling your steps and breaks
• Manipulating code flow
• Tracking classes and objects
• Ensuring WYSIWYG
• Debugging concurrent code
• Customizing the debugger
5. Tracking Classes
Step Out - Tracking Classes
• Class load breakpoints
• Static initializers
• All instances and count
– Requires ”JVM Memory Debugger View” plugin
6. Tracking Objects
SteP Out- Track Objects
• Instance initializers + default constructor
• Unique Id + Labelling objects
• Watch points + instance filter
• Tracking references
Execution Order
• Code evaluation
• Controlling your steps and breaks
• Manipulating code flow
• Tracking classes and objects
• Ensuring WYSIWYG
• Debugging concurrent code
• Customizing the debugger
7. Is What You See
Real?
Step Out- Connection to code
• Detecting erroneous source attachment
– Editor Warning
– Evaluate timestamp of class
• Method breakpoints
• Viewing actual code
Execution Order
• Code evaluation
• Controlling your steps and breaks
• Manipulating code flow
• Tracking classes and objects
• Ensuring WYSIWYG
• Debugging concurrent code
• Customizing the debugger
8. Dealing With
Concurrency
Step Out- concurrency
• Instance and thread filters on breakpoints
• Step resume
• Analyzing deadlocks
Execution Order
• Code evaluation
• Controlling your steps and breaks
• Manipulating code flow
• Tracking classes and objects
• Ensuring WYSIWYG
• Debugging concurrent code
• Customizing the debugger
9. Customizing the
DEbugger
Quick Recap - Customizing
the debugger
• Detail Formatters / Data Type Renderers
• Logical Structures
References
10. REferences
• IDE documentation
• Debugging in IDEA 2016.1
https://www.youtube.com/watch?v=VdBsUv4lnm
4
• Decentipede Eclipse plugin update site:
https://skarsaune.github.io/decentipede.update.s
ite
• JavaZone 2015: ”JVM Debugging under the
hood”. https://vimeo.com/138957695
Questio
ns
?
Thank you for your time! 

More Related Content

What's hot

Setting Up CircleCI Workflows for Your Salesforce Apps
Setting Up CircleCI Workflows for Your Salesforce AppsSetting Up CircleCI Workflows for Your Salesforce Apps
Setting Up CircleCI Workflows for Your Salesforce AppsDaniel Stange
 
Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)Hong Tat Yew
 
The Cowardly Test-o-Phobe's Guide To Testing
The Cowardly Test-o-Phobe's Guide To TestingThe Cowardly Test-o-Phobe's Guide To Testing
The Cowardly Test-o-Phobe's Guide To TestingTim Duckett
 
Ruin your life using robot framework
Ruin your life using robot frameworkRuin your life using robot framework
Ruin your life using robot frameworkPrayoch Rujira
 
Cypress first impressions
Cypress first impressionsCypress first impressions
Cypress first impressionsHans Emmel
 
.NET Unit Testing w/ Microsoft Fakes (TechCamp Memphis Spring 2012)
.NET Unit Testing w/ Microsoft Fakes (TechCamp Memphis Spring 2012).NET Unit Testing w/ Microsoft Fakes (TechCamp Memphis Spring 2012)
.NET Unit Testing w/ Microsoft Fakes (TechCamp Memphis Spring 2012)lancehilliard
 
Efficient HTTP applications on the JVM with Ratpack - Voxxed Days Berlin 2016
Efficient HTTP applications on the JVM with Ratpack - Voxxed Days Berlin 2016Efficient HTTP applications on the JVM with Ratpack - Voxxed Days Berlin 2016
Efficient HTTP applications on the JVM with Ratpack - Voxxed Days Berlin 2016Alvaro Sanchez-Mariscal
 
AngularJS and Protractor
AngularJS and ProtractorAngularJS and Protractor
AngularJS and ProtractorFilipe Falcão
 
Level Up Your Salesforce Unit Testing
Level Up Your Salesforce Unit TestingLevel Up Your Salesforce Unit Testing
Level Up Your Salesforce Unit TestingGordon Bockus
 
How to Use Selenium, Successfully
How to Use Selenium, SuccessfullyHow to Use Selenium, Successfully
How to Use Selenium, SuccessfullySauce Labs
 
Better Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component PatternBetter Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component PatternSargis Sargsyan
 
QA Fes 2016. Александр Хотемской. Обзор ProtractorJS как фреймворка для брауз...
QA Fes 2016. Александр Хотемской. Обзор ProtractorJS как фреймворка для брауз...QA Fes 2016. Александр Хотемской. Обзор ProtractorJS как фреймворка для брауз...
QA Fes 2016. Александр Хотемской. Обзор ProtractorJS как фреймворка для брауз...QAFest
 
How to Un-Flake Flaky Tests - A New Hire's Toolkit
How to Un-Flake Flaky Tests - A New Hire's ToolkitHow to Un-Flake Flaky Tests - A New Hire's Toolkit
How to Un-Flake Flaky Tests - A New Hire's ToolkitZachary Attas
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven DevelopmentBlazing Cloud
 
Self-Generating Test Artifacts for Selenium/WebDriver
Self-Generating Test Artifacts for Selenium/WebDriverSelf-Generating Test Artifacts for Selenium/WebDriver
Self-Generating Test Artifacts for Selenium/WebDriverseleniumconf
 

What's hot (20)

Setting Up CircleCI Workflows for Your Salesforce Apps
Setting Up CircleCI Workflows for Your Salesforce AppsSetting Up CircleCI Workflows for Your Salesforce Apps
Setting Up CircleCI Workflows for Your Salesforce Apps
 
Angular Unit Test
Angular Unit TestAngular Unit Test
Angular Unit Test
 
Angular Unit Testing
Angular Unit TestingAngular Unit Testing
Angular Unit Testing
 
Testing your code
Testing your codeTesting your code
Testing your code
 
Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)
 
The Cowardly Test-o-Phobe's Guide To Testing
The Cowardly Test-o-Phobe's Guide To TestingThe Cowardly Test-o-Phobe's Guide To Testing
The Cowardly Test-o-Phobe's Guide To Testing
 
Ruin your life using robot framework
Ruin your life using robot frameworkRuin your life using robot framework
Ruin your life using robot framework
 
Cypress first impressions
Cypress first impressionsCypress first impressions
Cypress first impressions
 
.NET Unit Testing w/ Microsoft Fakes (TechCamp Memphis Spring 2012)
.NET Unit Testing w/ Microsoft Fakes (TechCamp Memphis Spring 2012).NET Unit Testing w/ Microsoft Fakes (TechCamp Memphis Spring 2012)
.NET Unit Testing w/ Microsoft Fakes (TechCamp Memphis Spring 2012)
 
Efficient HTTP applications on the JVM with Ratpack - Voxxed Days Berlin 2016
Efficient HTTP applications on the JVM with Ratpack - Voxxed Days Berlin 2016Efficient HTTP applications on the JVM with Ratpack - Voxxed Days Berlin 2016
Efficient HTTP applications on the JVM with Ratpack - Voxxed Days Berlin 2016
 
AngularJS and Protractor
AngularJS and ProtractorAngularJS and Protractor
AngularJS and Protractor
 
Cypress workshop for JSFoo 2019
Cypress  workshop for JSFoo 2019Cypress  workshop for JSFoo 2019
Cypress workshop for JSFoo 2019
 
Level Up Your Salesforce Unit Testing
Level Up Your Salesforce Unit TestingLevel Up Your Salesforce Unit Testing
Level Up Your Salesforce Unit Testing
 
How to Use Selenium, Successfully
How to Use Selenium, SuccessfullyHow to Use Selenium, Successfully
How to Use Selenium, Successfully
 
Better Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component PatternBetter Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component Pattern
 
QA Fes 2016. Александр Хотемской. Обзор ProtractorJS как фреймворка для брауз...
QA Fes 2016. Александр Хотемской. Обзор ProtractorJS как фреймворка для брауз...QA Fes 2016. Александр Хотемской. Обзор ProtractorJS как фреймворка для брауз...
QA Fes 2016. Александр Хотемской. Обзор ProtractorJS как фреймворка для брауз...
 
How to Un-Flake Flaky Tests - A New Hire's Toolkit
How to Un-Flake Flaky Tests - A New Hire's ToolkitHow to Un-Flake Flaky Tests - A New Hire's Toolkit
How to Un-Flake Flaky Tests - A New Hire's Toolkit
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Protractor training
Protractor trainingProtractor training
Protractor training
 
Self-Generating Test Artifacts for Selenium/WebDriver
Self-Generating Test Artifacts for Selenium/WebDriverSelf-Generating Test Artifacts for Selenium/WebDriver
Self-Generating Test Artifacts for Selenium/WebDriver
 

Viewers also liked

2007 Excelencia en el idioma y diversidad cultural: claves de un modelo de ed...
2007 Excelencia en el idioma y diversidad cultural: claves de un modelo de ed...2007 Excelencia en el idioma y diversidad cultural: claves de un modelo de ed...
2007 Excelencia en el idioma y diversidad cultural: claves de un modelo de ed...Carmen Lizy Lamboy-Naughton, Ed.D.
 
From Web to Mobile: Monetizing Games for Kids
From Web to Mobile: Monetizing Games for KidsFrom Web to Mobile: Monetizing Games for Kids
From Web to Mobile: Monetizing Games for KidsClark Stacey
 
What I learned about firebase analytics
What I learned about firebase analyticsWhat I learned about firebase analytics
What I learned about firebase analyticsNick Guebhard
 
Real-Life Escape Game Industry overview YE2015
Real-Life Escape Game Industry overview YE2015Real-Life Escape Game Industry overview YE2015
Real-Life Escape Game Industry overview YE2015iAudit
 
Thesis final Opentaps ERP
Thesis final Opentaps ERPThesis final Opentaps ERP
Thesis final Opentaps ERPNguyen Duc
 
접근성(Accessibility)과 안드로이드
접근성(Accessibility)과 안드로이드접근성(Accessibility)과 안드로이드
접근성(Accessibility)과 안드로이드GDG Korea
 
D.G. - Present Simple VS. Present Continuous Lesson Plan
D.G. - Present Simple VS. Present Continuous Lesson PlanD.G. - Present Simple VS. Present Continuous Lesson Plan
D.G. - Present Simple VS. Present Continuous Lesson PlanDanielle Gonzalez
 

Viewers also liked (14)

goto java; (Jfokus)
goto java; (Jfokus)goto java; (Jfokus)
goto java; (Jfokus)
 
Family
FamilyFamily
Family
 
Sistema de informacion gerencia lyulvi
Sistema de informacion gerencia lyulviSistema de informacion gerencia lyulvi
Sistema de informacion gerencia lyulvi
 
Resume tirthankar basu
Resume tirthankar basuResume tirthankar basu
Resume tirthankar basu
 
2007 Excelencia en el idioma y diversidad cultural: claves de un modelo de ed...
2007 Excelencia en el idioma y diversidad cultural: claves de un modelo de ed...2007 Excelencia en el idioma y diversidad cultural: claves de un modelo de ed...
2007 Excelencia en el idioma y diversidad cultural: claves de un modelo de ed...
 
From Web to Mobile: Monetizing Games for Kids
From Web to Mobile: Monetizing Games for KidsFrom Web to Mobile: Monetizing Games for Kids
From Web to Mobile: Monetizing Games for Kids
 
Didactic Sequence 1
Didactic Sequence 1 Didactic Sequence 1
Didactic Sequence 1
 
What I learned about firebase analytics
What I learned about firebase analyticsWhat I learned about firebase analytics
What I learned about firebase analytics
 
Thermal 3.2
Thermal 3.2Thermal 3.2
Thermal 3.2
 
Real-Life Escape Game Industry overview YE2015
Real-Life Escape Game Industry overview YE2015Real-Life Escape Game Industry overview YE2015
Real-Life Escape Game Industry overview YE2015
 
Thesis final Opentaps ERP
Thesis final Opentaps ERPThesis final Opentaps ERP
Thesis final Opentaps ERP
 
접근성(Accessibility)과 안드로이드
접근성(Accessibility)과 안드로이드접근성(Accessibility)과 안드로이드
접근성(Accessibility)과 안드로이드
 
Elements of e didactics
Elements of e didacticsElements of e didactics
Elements of e didactics
 
D.G. - Present Simple VS. Present Continuous Lesson Plan
D.G. - Present Simple VS. Present Continuous Lesson PlanD.G. - Present Simple VS. Present Continuous Lesson Plan
D.G. - Present Simple VS. Present Continuous Lesson Plan
 

Similar to Tricks

Web a Quebec - JS Debugging
Web a Quebec - JS DebuggingWeb a Quebec - JS Debugging
Web a Quebec - JS DebuggingRami Sayar
 
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan KuštInfinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan KuštInfinum
 
Testing Tools Online Training.pdf
Testing Tools Online Training.pdfTesting Tools Online Training.pdf
Testing Tools Online Training.pdfSpiritsoftsTraining
 
Behat bdd training (php) course slides pdf
Behat bdd training (php) course slides pdfBehat bdd training (php) course slides pdf
Behat bdd training (php) course slides pdfseleniumbootcamp
 
WTF TDD?
WTF TDD?WTF TDD?
WTF TDD?jeremyw
 
Testing Tools course training institute hyderabad – Best software training in...
Testing Tools course training institute hyderabad – Best software training in...Testing Tools course training institute hyderabad – Best software training in...
Testing Tools course training institute hyderabad – Best software training in...Jaya Suresh Nunna
 
Quality at Speed - Penny Wyatt
Quality at Speed - Penny WyattQuality at Speed - Penny Wyatt
Quality at Speed - Penny WyattAtlassian
 
Tooling for the productive front-end developer
Tooling for the productive front-end developerTooling for the productive front-end developer
Tooling for the productive front-end developerMaurice De Beijer [MVP]
 
Continuous Integration For Rails Project
Continuous Integration For Rails ProjectContinuous Integration For Rails Project
Continuous Integration For Rails ProjectLouie Zhao
 
Testing-Tools-Magnitia-Content.pdf
Testing-Tools-Magnitia-Content.pdfTesting-Tools-Magnitia-Content.pdf
Testing-Tools-Magnitia-Content.pdfAnanthReddy38
 
The Many Ways to Test Your React App
The Many Ways to Test Your React AppThe Many Ways to Test Your React App
The Many Ways to Test Your React AppAll Things Open
 
Devday2016 real unittestingwithmockframework-phatvu
Devday2016 real unittestingwithmockframework-phatvuDevday2016 real unittestingwithmockframework-phatvu
Devday2016 real unittestingwithmockframework-phatvuPhat VU
 
Jasmine - A BDD test framework for JavaScript
Jasmine - A BDD test framework for JavaScriptJasmine - A BDD test framework for JavaScript
Jasmine - A BDD test framework for JavaScriptSumanth krishna
 
QTP Power Point Presentation
QTP Power Point PresentationQTP Power Point Presentation
QTP Power Point PresentationSVRTechnologies
 

Similar to Tricks (20)

CodeOne Java Debugging Tips
CodeOne Java Debugging TipsCodeOne Java Debugging Tips
CodeOne Java Debugging Tips
 
Web a Quebec - JS Debugging
Web a Quebec - JS DebuggingWeb a Quebec - JS Debugging
Web a Quebec - JS Debugging
 
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan KuštInfinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
 
Testing Tools Online Training.pdf
Testing Tools Online Training.pdfTesting Tools Online Training.pdf
Testing Tools Online Training.pdf
 
Building XWiki
Building XWikiBuilding XWiki
Building XWiki
 
Foundation selenium java
Foundation selenium java Foundation selenium java
Foundation selenium java
 
Behat bdd training (php) course slides pdf
Behat bdd training (php) course slides pdfBehat bdd training (php) course slides pdf
Behat bdd training (php) course slides pdf
 
WTF TDD?
WTF TDD?WTF TDD?
WTF TDD?
 
Testing Tools course training institute hyderabad – Best software training in...
Testing Tools course training institute hyderabad – Best software training in...Testing Tools course training institute hyderabad – Best software training in...
Testing Tools course training institute hyderabad – Best software training in...
 
Quality at Speed - Penny Wyatt
Quality at Speed - Penny WyattQuality at Speed - Penny Wyatt
Quality at Speed - Penny Wyatt
 
Intro to Maven.ppt
Intro to Maven.pptIntro to Maven.ppt
Intro to Maven.ppt
 
Unit Testing Your Application
Unit Testing Your ApplicationUnit Testing Your Application
Unit Testing Your Application
 
Tooling for the productive front-end developer
Tooling for the productive front-end developerTooling for the productive front-end developer
Tooling for the productive front-end developer
 
Continuous Integration For Rails Project
Continuous Integration For Rails ProjectContinuous Integration For Rails Project
Continuous Integration For Rails Project
 
Testing-Tools-Magnitia-Content.pdf
Testing-Tools-Magnitia-Content.pdfTesting-Tools-Magnitia-Content.pdf
Testing-Tools-Magnitia-Content.pdf
 
The Many Ways to Test Your React App
The Many Ways to Test Your React AppThe Many Ways to Test Your React App
The Many Ways to Test Your React App
 
Devday2016 real unittestingwithmockframework-phatvu
Devday2016 real unittestingwithmockframework-phatvuDevday2016 real unittestingwithmockframework-phatvu
Devday2016 real unittestingwithmockframework-phatvu
 
Test-Driven Sitecore
Test-Driven SitecoreTest-Driven Sitecore
Test-Driven Sitecore
 
Jasmine - A BDD test framework for JavaScript
Jasmine - A BDD test framework for JavaScriptJasmine - A BDD test framework for JavaScript
Jasmine - A BDD test framework for JavaScript
 
QTP Power Point Presentation
QTP Power Point PresentationQTP Power Point Presentation
QTP Power Point Presentation
 

More from Martin (高馬丁) Skarsaune (9)

jmc-devoxx.pptx
jmc-devoxx.pptxjmc-devoxx.pptx
jmc-devoxx.pptx
 
Flight recordings and mission control through thick clouds
Flight recordings and mission control through thick cloudsFlight recordings and mission control through thick clouds
Flight recordings and mission control through thick clouds
 
Cloud Collaboration with Eclipse Che
Cloud Collaboration with Eclipse CheCloud Collaboration with Eclipse Che
Cloud Collaboration with Eclipse Che
 
Goto devoxx
Goto devoxxGoto devoxx
Goto devoxx
 
Small Lambda Talk @Booster2015
Small Lambda Talk @Booster2015Small Lambda Talk @Booster2015
Small Lambda Talk @Booster2015
 
Small lambda talk
Small lambda talkSmall lambda talk
Small lambda talk
 
Bring your calculations to Scala!
Bring your calculations to Scala!Bring your calculations to Scala!
Bring your calculations to Scala!
 
JavaZone 2014 - goto java;
JavaZone 2014 - goto java;JavaZone 2014 - goto java;
JavaZone 2014 - goto java;
 
JavaZone 2014 - Iteration 2.0: Stream
JavaZone 2014 - Iteration 2.0: StreamJavaZone 2014 - Iteration 2.0: Stream
JavaZone 2014 - Iteration 2.0: Stream
 

Recently uploaded

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 

Recently uploaded (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 

Tricks

  • 1. Martin Skarsaune Senior Developer and Co-Owner @MSkarsaune Debugging Tricks 高 馬 丁 We’re Hiring
  • 2. Execution Order • Code evaluation • Controlling your steps and breaks • Manipulating code flow • Tracking classes and objects • Ensuring WYSIWYG • Debugging concurrent code • Customizing the debugger
  • 3. Frames + threads Variables Watches ? Test Results? Console Display ? Code
  • 4. Frames + threads Test Results? Variables + watchesConsole Code
  • 5. 1. Should you always launch in debug mode?
  • 6. IMHO: Always Launch in Debug Mode! • Ability to halt and troubleshoot • Threads • Hot code replacement • Consider launching externally
  • 7. Excecution Order • Code evaluation • Controlling your steps and breaks • Manipulating code flow • Tracking classes and objects • Ensuring WYSIWYG • Debugging concurrent code • Customizing the debugger
  • 9. Step Out- Code Evaluation • Both in Java editor and free form • Nothing is private  • Watches • In breakpoints • Nested evaluations / breaks • Scrapbook
  • 10. Execution Order • Code evaluation • Controlling your steps and breaks • Manipulating code flow • Tracking classes and objects • Ensuring WYSIWYG • Debugging concurrent code • Customizing the debugger
  • 11. 3. Controlling your steps and Breaks
  • 12. Step OUt- Controlling your steps and breaks • Step filters • Frame filters • Smart stepping • Lambda stepping and breakpoints • Exception breakpoints – Break after
  • 13. Execution Order • Code evaluation • Controlling your steps and breaks • Manipulating code flow • Tracking classes and objects • Ensuring WYSIWYG • Debugging concurrent code • Customizing the debugger
  • 15. Step Out- Manipulating Flow • Drop to frame • Modify values – nothing is really final  • Force return
  • 16. Execution Order • Code evaluation • Controlling your steps and breaks • Manipulating code flow • Tracking classes and objects • Ensuring WYSIWYG • Debugging concurrent code • Customizing the debugger
  • 18. Step Out - Tracking Classes • Class load breakpoints • Static initializers • All instances and count – Requires ”JVM Memory Debugger View” plugin
  • 20. SteP Out- Track Objects • Instance initializers + default constructor • Unique Id + Labelling objects • Watch points + instance filter • Tracking references
  • 21. Execution Order • Code evaluation • Controlling your steps and breaks • Manipulating code flow • Tracking classes and objects • Ensuring WYSIWYG • Debugging concurrent code • Customizing the debugger
  • 22. 7. Is What You See Real?
  • 23. Step Out- Connection to code • Detecting erroneous source attachment – Editor Warning – Evaluate timestamp of class • Method breakpoints • Viewing actual code
  • 24. Execution Order • Code evaluation • Controlling your steps and breaks • Manipulating code flow • Tracking classes and objects • Ensuring WYSIWYG • Debugging concurrent code • Customizing the debugger
  • 26. Step Out- concurrency • Instance and thread filters on breakpoints • Step resume • Analyzing deadlocks
  • 27. Execution Order • Code evaluation • Controlling your steps and breaks • Manipulating code flow • Tracking classes and objects • Ensuring WYSIWYG • Debugging concurrent code • Customizing the debugger
  • 29. Quick Recap - Customizing the debugger • Detail Formatters / Data Type Renderers • Logical Structures
  • 31. 10. REferences • IDE documentation • Debugging in IDEA 2016.1 https://www.youtube.com/watch?v=VdBsUv4lnm 4 • Decentipede Eclipse plugin update site: https://skarsaune.github.io/decentipede.update.s ite • JavaZone 2015: ”JVM Debugging under the hood”. https://vimeo.com/138957695
  • 32. Questio ns ? Thank you for your time! 

Editor's Notes

  1. Welcome everyone to this session where I will be focusing on debugging. My name is bla bla. I like to learn from other developers. Pick up some ideas. So what I plan to do is to demonstrate a few familiar scenarios, where we are in a debug session, and want to find out something or solve a problem. We will see what features and techniques can be used. Some of it may be known to you already, and in that case credit to you. Hopefully other things may be new or used in a different way than what you are used to. Hope show you something new today. Also some custom plugin functionality that is guaranteed to be new. I will also demonstrate some custom plugin functionality that is guaranteed to be new.
  2. I intend to look at the following topics. I have organized them according to what I myself found the most productive and rewarding from the top. That also solve quite common problems, and then more exotic tips towards the end. First I want to look at the debuggers ability to evaluate Java code on the fly. What it can be used for. Also in what way it is limited to normal code, but also cases where you can achieve things that you are not able to with normal code in your application. Then I would like to look at how the debugger can be used to manipulate the flow of an application. For instance if you want to test your application in a scenario, that may not be easily or consistently reproducable. Then I want to look at what tools there are to make stepping code and setting breakpoints as efficient and
  3. Some words on visual setup, which is not the same as I would normally use. These days I guess the trend is to concentrate on editing code as you work, with things like the distraction free mode in IntelliJ. When I debug however I prioritize differently. I normally do not have to see that many lines of code to troubleshoot, but I do want to have critical information at my fingertips. Normally you would have a large screen that allow you to arrange the different views at dedicated places. I guess many people have several large screens, so you can even distribute views over several windows or have floating views spread out. The moment you find a certain view not needed or a distraction, you can simply minimize it. If you find that your debug session takes you into a more active browsing and coding mode, you can simply maximize the editor, change perspective in Eclipse or go to distraction free mode in IntelliJ. What you really don’t want is to have to constantly change views in order to find the information you are looking for. If we look at this Eclipse example for instance. I normally like quite a lot of space for threads and frames, always have the variables visible. If I use watch expressions actively I would like to have them visible as well. If I’m debugging tests, I might want to keep track of the progress. Depending on the application I often want quite a lot of the console visible, also to keep track of what is going on. If I evaluate a lot of code on the fly, I might keep the Display view open, but most of the time it is sufficient to bring it up when I need it.
  4. If we take a similar look at IntelliJ.
  5. I intend to look at the following topics. I have organized them according to what I myself found the most productive and rewarding from the top. That also solve quite common problems, and then more exotic tips towards the end. First I want to look at the debuggers ability to evaluate Java code on the fly. What it can be used for. Also in what way it is limited to normal code, but also cases where you can achieve things that you are not able to with normal code in your application. Then I would like to look at how the debugger can be used to manipulate the flow of an application. For instance if you want to test your application in a scenario, that may not be easily or consistently reproducable. Then I want to look at what tools there are to make stepping code and setting breakpoints as efficient and
  6. Eclipse: Editor + Display + Scratch, breakpoint and evaluate, Log as part of conditional breakpoint. Terminate evaluation, Scratch: stream, regex, byte manipulation IntelliJ : Evaluate private, expression vs snippet, history, alt + operators, keep in scratch. Use appendable to log as part of conditional breakpoint. NB
  7. I intend to look at the following topics. I have organized them according to what I myself found the most productive and rewarding from the top. That also solve quite common problems, and then more exotic tips towards the end. First I want to look at the debuggers ability to evaluate Java code on the fly. What it can be used for. Also in what way it is limited to normal code, but also cases where you can achieve things that you are not able to with normal code in your application. Then I would like to look at how the debugger can be used to manipulate the flow of an application. For instance if you want to test your application in a scenario, that may not be easily or consistently reproducable. Then I want to look at what tools there are to make stepping code and setting breakpoints as efficient and
  8. Eclipse: Editor + Display + Scratch, breakpoint and evaluate IntelliJ : Evaluate private, expression vs snippet, history, alt + operators
  9. I intend to look at the following topics. I have organized them according to what I myself found the most productive and rewarding from the top. That also solve quite common problems, and then more exotic tips towards the end. First I want to look at the debuggers ability to evaluate Java code on the fly. What it can be used for. Also in what way it is limited to normal code, but also cases where you can achieve things that you are not able to with normal code in your application. Then I would like to look at how the debugger can be used to manipulate the flow of an application. For instance if you want to test your application in a scenario, that may not be easily or consistently reproducable. Then I want to look at what tools there are to make stepping code and setting breakpoints as efficient and
  10. Eclipse: Editor + Display + Scratch, breakpoint and evaluate IntelliJ : Evaluate private, expression vs snippet, history, alt + operators
  11. I intend to look at the following topics. I have organized them according to what I myself found the most productive and rewarding from the top. That also solve quite common problems, and then more exotic tips towards the end. First I want to look at the debuggers ability to evaluate Java code on the fly. What it can be used for. Also in what way it is limited to normal code, but also cases where you can achieve things that you are not able to with normal code in your application. Then I would like to look at how the debugger can be used to manipulate the flow of an application. For instance if you want to test your application in a scenario, that may not be easily or consistently reproducable. Then I want to look at what tools there are to make stepping code and setting breakpoints as efficient and
  12. I intend to look at the following topics. I have organized them according to what I myself found the most productive and rewarding from the top. That also solve quite common problems, and then more exotic tips towards the end. First I want to look at the debuggers ability to evaluate Java code on the fly. What it can be used for. Also in what way it is limited to normal code, but also cases where you can achieve things that you are not able to with normal code in your application. Then I would like to look at how the debugger can be used to manipulate the flow of an application. For instance if you want to test your application in a scenario, that may not be easily or consistently reproducable. Then I want to look at what tools there are to make stepping code and setting breakpoints as efficient and
  13. I intend to look at the following topics. I have organized them according to what I myself found the most productive and rewarding from the top. That also solve quite common problems, and then more exotic tips towards the end. First I want to look at the debuggers ability to evaluate Java code on the fly. What it can be used for. Also in what way it is limited to normal code, but also cases where you can achieve things that you are not able to with normal code in your application. Then I would like to look at how the debugger can be used to manipulate the flow of an application. For instance if you want to test your application in a scenario, that may not be easily or consistently reproducable. Then I want to look at what tools there are to make stepping code and setting breakpoints as efficient and
  14. I intend to look at the following topics. I have organized them according to what I myself found the most productive and rewarding from the top. That also solve quite common problems, and then more exotic tips towards the end. First I want to look at the debuggers ability to evaluate Java code on the fly. What it can be used for. Also in what way it is limited to normal code, but also cases where you can achieve things that you are not able to with normal code in your application. Then I would like to look at how the debugger can be used to manipulate the flow of an application. For instance if you want to test your application in a scenario, that may not be easily or consistently reproducable. Then I want to look at what tools there are to make stepping code and setting breakpoints as efficient and