On the Dichotomy of Debugging Behavior Among Programmers

Moritz Beller
Moritz BellerDelft University of Technology
What do these nerds have in common?
Linus Torvalds does
not use debuggers.
Thanks, Daniel Lemire! https://lemire.me/blog/2016/06/21/i-do-not-use-a-debugger/
Robert C. Martin
thinks that
debuggers are a
wasteful timesink.
Guido van Rossum uses
printf for 90% of his
debugging.
They all dislike debugging.
On the Dichotomy of Debugging
Behavior Among Programmers
Moritz Beller, Niels Spruit, Andy Zaidman Diomidis Spinellis
What do we know about debugging?
“We have anecdotes from people using our debugger here and there or
looking over their shoulders, but nothing substantial.”
Eclipse Debug Lead
“
What do we know about debugging?
Research Questions
RQ1 What do developers know about debugging and how do
they reflect on it?
RQ2 How do developers debug in their IDEs?
RQ3 How do individual debugger users and experts interpret our
findings from RQ1 and RQ2?
Study Design
176 survey respondents, ⅓
Eclipse and ⅓ IntelliJ. 84% Java
programmers.
458 WatchDog participants, ⅓ Eclipse and ⅓ IntelliJ.
100% Java programmers. Over 2 months, recorded 10.3
IDE work years. Heterogeneous mix of private,
open-source, and commercial projects.
7 interviews with 9 experts in the
field including developers of IDE
debuggers.
RQ1 What do developers know about
debugging?
RQ1 What do developers know about
debugging?
of developers use the IDE debugger.
Only 8.5% explicitly do not.81%
of developers examine log files and print statements.
72%
Testing is integral part of the debugging process.
Experience has no impact on self-reported debugging knowledge.
RQ1.13 “Printf debugging is still the best
invention in debugging.”
People saying that printfs are better never learned how to use a
debugger.“
100% Agree.
“
printf is travelling by foot, a GUI debugger is travelling [by] plane. You can go to more
places by foot, but you can only go that far.“
RQ1.13 “Printf debugging is still the best
invention in debugging.”
RQ2 How do developers debug in their
IDEs?
Measured with 2.0
www.testroots.org
On the Dichotomy of Debugging Behavior Among Programmers
RQ2 How do developers debug in their
IDEs?
In 9% of IDE sessions, developers run a debugger.
On average, debugging consumes < 14% of in-IDE time.
88% of debugging sessions are < 10 minutes.
RQ2 How do developers debug in their
IDEs?
of debugging sessions start after reading (52%) or modifying (19%)
code. Only 0.5% after running a test.71%
Smaller classes are debugged more than larger classes. There is
no correlation between the size of the class and its debugging
duration.
Developers who spend more time executing tests are likely to
debug more. Developers who read or modify tests longer do not
debug less (ρ = -0.08).
ρ =
0.58
ρ =
-0.75
RQ2 How do developers debug in their
IDEs?
Breakpoint type #
Method 4,229
Class prepare 99
4 Others 216
Σ 4,544
RQ2 How do developers debug in their
IDEs?
‘Advanced’ debugging features are seldom used.
Event type #
Add breakpoint 4,544
Remove breakpoint 4,362
Define watch 343
Modify variable value 4
Hit count 0
Step over 19,543
Step into 3,480
Step out 351
5 others 543
Σ 33,170
Consolidation with experts
Finding RQ1 RQ2 RQ3
6. Developers are divided on printf debugging. RQ1 ~ ~
3. Advanced debugging features are seldom used. RQ1 RQ2 ✔
4. Debuggers are difficult to use. RQ1 ✔ ✔
5. There is a lack of knowledge on how to use them. RQ1 ✔ ✔
1. Debugging is a fast-paced act. ✘ RQ2 ✔
2. Debugging and testing are tightly intertwined. RQ1 ✘ ~
What can we do?
As educators, integrate debugging into courses. Teach debugging hands-on,
not only abstractly.
As debugger developers, care about usability first and number of features later.
- Back-in-time debuggers
- Live REPL
- Domain-specific debuggers
- Many small improvements can lead to a big improvement
What did we do?
“Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it.”
Brian Kernighan
“
1 von 20

Recomendados

Sonar von
Sonar Sonar
Sonar Novencia Groupe
2.5K views24 Folien
Resume-06-13-2016 von
Resume-06-13-2016Resume-06-13-2016
Resume-06-13-2016David Thiessen
142 views3 Folien
Automated Tests for Android apps von
Automated Tests for Android appsAutomated Tests for Android apps
Automated Tests for Android appsClément Quaquin
469 views21 Folien
Is your code ready for testing? von
Is your code ready for testing?Is your code ready for testing?
Is your code ready for testing?Ralph Ligtenberg
198 views15 Folien
Harris Altaf (1) von
Harris Altaf (1)Harris Altaf (1)
Harris Altaf (1)Harris Altaf
112 views2 Folien
Legacy code rehab. von
Legacy code rehab.Legacy code rehab.
Legacy code rehab.johnnonolan
449 views18 Folien

Más contenido relacionado

Similar a On the Dichotomy of Debugging Behavior Among Programmers

Practices of agile developers von
Practices of agile developersPractices of agile developers
Practices of agile developersDUONG Trong Tan
1.2K views34 Folien
Introduction of Tools for providing rich user experience in debugger von
Introduction of Tools for providing rich user experience in debuggerIntroduction of Tools for providing rich user experience in debugger
Introduction of Tools for providing rich user experience in debuggerNaoto Ono
1.5K views76 Folien
How Do Developers Toggle Breakpoints? von
How Do Developers Toggle Breakpoints?How Do Developers Toggle Breakpoints?
How Do Developers Toggle Breakpoints?Fabio Petrillo
179 views30 Folien
Qrs17a.ppt von
Qrs17a.pptQrs17a.ppt
Qrs17a.pptPtidej Team
41 views30 Folien
Qrs17a.ppt von
Qrs17a.pptQrs17a.ppt
Qrs17a.pptYann-Gaël Guéhéneuc
11 views30 Folien
Pair Programming Presentation von
Pair Programming PresentationPair Programming Presentation
Pair Programming PresentationThoughtWorks
8.1K views30 Folien

Similar a On the Dichotomy of Debugging Behavior Among Programmers(20)

Introduction of Tools for providing rich user experience in debugger von Naoto Ono
Introduction of Tools for providing rich user experience in debuggerIntroduction of Tools for providing rich user experience in debugger
Introduction of Tools for providing rich user experience in debugger
Naoto Ono1.5K views
How Do Developers Toggle Breakpoints? von Fabio Petrillo
How Do Developers Toggle Breakpoints?How Do Developers Toggle Breakpoints?
How Do Developers Toggle Breakpoints?
Fabio Petrillo179 views
Pair Programming Presentation von ThoughtWorks
Pair Programming PresentationPair Programming Presentation
Pair Programming Presentation
ThoughtWorks8.1K views
Test Driven Development Methodology and Philosophy von Vijay Kumbhar
Test Driven Development Methodology and Philosophy Test Driven Development Methodology and Philosophy
Test Driven Development Methodology and Philosophy
Vijay Kumbhar3.2K views
Test driven development (TDD) in product development.pdf von Beroza Paul
Test driven development (TDD) in product development.pdfTest driven development (TDD) in product development.pdf
Test driven development (TDD) in product development.pdf
Beroza Paul8 views
« Training Within Software » using Dojo and Mob Programming by Bernard Notari... von Institut Lean France
« Training Within Software » using Dojo and Mob Programming by Bernard Notari...« Training Within Software » using Dojo and Mob Programming by Bernard Notari...
« Training Within Software » using Dojo and Mob Programming by Bernard Notari...
Being a professional software tester von Anton Keks
Being a professional software testerBeing a professional software tester
Being a professional software tester
Anton Keks4.5K views
Software Carpentry for the Geophysical Sciences von Aron Ahmadia
Software Carpentry for the Geophysical SciencesSoftware Carpentry for the Geophysical Sciences
Software Carpentry for the Geophysical Sciences
Aron Ahmadia940 views
Capability Building for Cyber Defense: Software Walk through and Screening von Maven Logix
Capability Building for Cyber Defense: Software Walk through and Screening Capability Building for Cyber Defense: Software Walk through and Screening
Capability Building for Cyber Defense: Software Walk through and Screening
Maven Logix 95 views
Code Retreat von Igor Popov
Code RetreatCode Retreat
Code Retreat
Igor Popov1.2K views
Open source software best practices von parewalabs
Open source software best practicesOpen source software best practices
Open source software best practices
parewalabs37 views
Technologist_Interviews___Welcome_to_Modanisa_Wiki_2 (1).pdf von zohaib247331
Technologist_Interviews___Welcome_to_Modanisa_Wiki_2 (1).pdfTechnologist_Interviews___Welcome_to_Modanisa_Wiki_2 (1).pdf
Technologist_Interviews___Welcome_to_Modanisa_Wiki_2 (1).pdf
zohaib2473313 views
Clean application development (talk) von Adam Culp
Clean application development (talk)Clean application development (talk)
Clean application development (talk)
Adam Culp3K views

Más de Moritz Beller

Modern Code Reviews in Open-Source Projects: Which Problems Do They Fix? von
Modern Code Reviews in Open-Source Projects: Which Problems Do They Fix?Modern Code Reviews in Open-Source Projects: Which Problems Do They Fix?
Modern Code Reviews in Open-Source Projects: Which Problems Do They Fix?Moritz Beller
451 views130 Folien
Analyzing the State of Static Analysis: A Large-Scale Evaluation in Open Sour... von
Analyzing the State of Static Analysis: A Large-Scale Evaluation in Open Sour...Analyzing the State of Static Analysis: A Large-Scale Evaluation in Open Sour...
Analyzing the State of Static Analysis: A Large-Scale Evaluation in Open Sour...Moritz Beller
1.6K views91 Folien
The Last Line Effect von
The Last Line EffectThe Last Line Effect
The Last Line EffectMoritz Beller
1.2K views55 Folien
How (Much) Do Developers Test? von
How (Much) Do Developers Test?How (Much) Do Developers Test?
How (Much) Do Developers Test?Moritz Beller
1.5K views39 Folien
How (Much) Do Developers Test? von
How (Much) Do Developers Test?How (Much) Do Developers Test?
How (Much) Do Developers Test?Moritz Beller
1K views59 Folien
Modern Code Reviews in Open Source Projects: Which Problems Do They Fix? von
Modern Code Reviews in Open Source Projects: Which Problems Do They Fix?Modern Code Reviews in Open Source Projects: Which Problems Do They Fix?
Modern Code Reviews in Open Source Projects: Which Problems Do They Fix?Moritz Beller
1.1K views69 Folien

Más de Moritz Beller(6)

Modern Code Reviews in Open-Source Projects: Which Problems Do They Fix? von Moritz Beller
Modern Code Reviews in Open-Source Projects: Which Problems Do They Fix?Modern Code Reviews in Open-Source Projects: Which Problems Do They Fix?
Modern Code Reviews in Open-Source Projects: Which Problems Do They Fix?
Moritz Beller451 views
Analyzing the State of Static Analysis: A Large-Scale Evaluation in Open Sour... von Moritz Beller
Analyzing the State of Static Analysis: A Large-Scale Evaluation in Open Sour...Analyzing the State of Static Analysis: A Large-Scale Evaluation in Open Sour...
Analyzing the State of Static Analysis: A Large-Scale Evaluation in Open Sour...
Moritz Beller1.6K views
How (Much) Do Developers Test? von Moritz Beller
How (Much) Do Developers Test?How (Much) Do Developers Test?
How (Much) Do Developers Test?
Moritz Beller1.5K views
How (Much) Do Developers Test? von Moritz Beller
How (Much) Do Developers Test?How (Much) Do Developers Test?
How (Much) Do Developers Test?
Moritz Beller1K views
Modern Code Reviews in Open Source Projects: Which Problems Do They Fix? von Moritz Beller
Modern Code Reviews in Open Source Projects: Which Problems Do They Fix?Modern Code Reviews in Open Source Projects: Which Problems Do They Fix?
Modern Code Reviews in Open Source Projects: Which Problems Do They Fix?
Moritz Beller1.1K views

Último

BushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports von
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug ReportsBushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug ReportsRa'Fat Al-Msie'deen
8 views49 Folien
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols von
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - DolsDSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - DolsDeltares
7 views23 Folien
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ... von
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...Deltares
11 views32 Folien
Navigating container technology for enhanced security by Niklas Saari von
Navigating container technology for enhanced security by Niklas SaariNavigating container technology for enhanced security by Niklas Saari
Navigating container technology for enhanced security by Niklas SaariMetosin Oy
14 views34 Folien
Dapr Unleashed: Accelerating Microservice Development von
Dapr Unleashed: Accelerating Microservice DevelopmentDapr Unleashed: Accelerating Microservice Development
Dapr Unleashed: Accelerating Microservice DevelopmentMiroslav Janeski
10 views29 Folien
DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme... von
DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme...DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme...
DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme...Deltares
5 views28 Folien

Último(20)

BushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports von Ra'Fat Al-Msie'deen
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug ReportsBushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols von Deltares
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - DolsDSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols
Deltares7 views
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ... von Deltares
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...
Deltares11 views
Navigating container technology for enhanced security by Niklas Saari von Metosin Oy
Navigating container technology for enhanced security by Niklas SaariNavigating container technology for enhanced security by Niklas Saari
Navigating container technology for enhanced security by Niklas Saari
Metosin Oy14 views
Dapr Unleashed: Accelerating Microservice Development von Miroslav Janeski
Dapr Unleashed: Accelerating Microservice DevelopmentDapr Unleashed: Accelerating Microservice Development
Dapr Unleashed: Accelerating Microservice Development
Miroslav Janeski10 views
DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme... von Deltares
DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme...DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme...
DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme...
Deltares5 views
DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the... von Deltares
DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the...DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the...
DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the...
Deltares6 views
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI... von Marc Müller
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Marc Müller37 views
Software evolution understanding: Automatic extraction of software identifier... von Ra'Fat Al-Msie'deen
Software evolution understanding: Automatic extraction of software identifier...Software evolution understanding: Automatic extraction of software identifier...
Software evolution understanding: Automatic extraction of software identifier...
DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -... von Deltares
DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -...DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -...
DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -...
Deltares6 views
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko... von Deltares
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...
Deltares14 views
DSD-INT 2023 Thermobaricity in 3D DCSM-FM - taking pressure into account in t... von Deltares
DSD-INT 2023 Thermobaricity in 3D DCSM-FM - taking pressure into account in t...DSD-INT 2023 Thermobaricity in 3D DCSM-FM - taking pressure into account in t...
DSD-INT 2023 Thermobaricity in 3D DCSM-FM - taking pressure into account in t...
Deltares9 views
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - Geertsema von Deltares
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - GeertsemaDSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - Geertsema
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - Geertsema
Deltares17 views
Gen Apps on Google Cloud PaLM2 and Codey APIs in Action von Márton Kodok
Gen Apps on Google Cloud PaLM2 and Codey APIs in ActionGen Apps on Google Cloud PaLM2 and Codey APIs in Action
Gen Apps on Google Cloud PaLM2 and Codey APIs in Action
Márton Kodok5 views
SUGCON ANZ Presentation V2.1 Final.pptx von Jack Spektor
SUGCON ANZ Presentation V2.1 Final.pptxSUGCON ANZ Presentation V2.1 Final.pptx
SUGCON ANZ Presentation V2.1 Final.pptx
Jack Spektor22 views

On the Dichotomy of Debugging Behavior Among Programmers

  • 1. What do these nerds have in common? Linus Torvalds does not use debuggers. Thanks, Daniel Lemire! https://lemire.me/blog/2016/06/21/i-do-not-use-a-debugger/ Robert C. Martin thinks that debuggers are a wasteful timesink. Guido van Rossum uses printf for 90% of his debugging. They all dislike debugging.
  • 2. On the Dichotomy of Debugging Behavior Among Programmers Moritz Beller, Niels Spruit, Andy Zaidman Diomidis Spinellis
  • 3. What do we know about debugging?
  • 4. “We have anecdotes from people using our debugger here and there or looking over their shoulders, but nothing substantial.” Eclipse Debug Lead “ What do we know about debugging?
  • 5. Research Questions RQ1 What do developers know about debugging and how do they reflect on it? RQ2 How do developers debug in their IDEs? RQ3 How do individual debugger users and experts interpret our findings from RQ1 and RQ2?
  • 6. Study Design 176 survey respondents, ⅓ Eclipse and ⅓ IntelliJ. 84% Java programmers. 458 WatchDog participants, ⅓ Eclipse and ⅓ IntelliJ. 100% Java programmers. Over 2 months, recorded 10.3 IDE work years. Heterogeneous mix of private, open-source, and commercial projects. 7 interviews with 9 experts in the field including developers of IDE debuggers.
  • 7. RQ1 What do developers know about debugging?
  • 8. RQ1 What do developers know about debugging? of developers use the IDE debugger. Only 8.5% explicitly do not.81% of developers examine log files and print statements. 72% Testing is integral part of the debugging process. Experience has no impact on self-reported debugging knowledge.
  • 9. RQ1.13 “Printf debugging is still the best invention in debugging.” People saying that printfs are better never learned how to use a debugger.“ 100% Agree. “ printf is travelling by foot, a GUI debugger is travelling [by] plane. You can go to more places by foot, but you can only go that far.“
  • 10. RQ1.13 “Printf debugging is still the best invention in debugging.”
  • 11. RQ2 How do developers debug in their IDEs? Measured with 2.0 www.testroots.org
  • 13. RQ2 How do developers debug in their IDEs? In 9% of IDE sessions, developers run a debugger. On average, debugging consumes < 14% of in-IDE time. 88% of debugging sessions are < 10 minutes.
  • 14. RQ2 How do developers debug in their IDEs? of debugging sessions start after reading (52%) or modifying (19%) code. Only 0.5% after running a test.71% Smaller classes are debugged more than larger classes. There is no correlation between the size of the class and its debugging duration. Developers who spend more time executing tests are likely to debug more. Developers who read or modify tests longer do not debug less (ρ = -0.08). ρ = 0.58 ρ = -0.75
  • 15. RQ2 How do developers debug in their IDEs? Breakpoint type # Method 4,229 Class prepare 99 4 Others 216 Σ 4,544
  • 16. RQ2 How do developers debug in their IDEs? ‘Advanced’ debugging features are seldom used. Event type # Add breakpoint 4,544 Remove breakpoint 4,362 Define watch 343 Modify variable value 4 Hit count 0 Step over 19,543 Step into 3,480 Step out 351 5 others 543 Σ 33,170
  • 17. Consolidation with experts Finding RQ1 RQ2 RQ3 6. Developers are divided on printf debugging. RQ1 ~ ~ 3. Advanced debugging features are seldom used. RQ1 RQ2 ✔ 4. Debuggers are difficult to use. RQ1 ✔ ✔ 5. There is a lack of knowledge on how to use them. RQ1 ✔ ✔ 1. Debugging is a fast-paced act. ✘ RQ2 ✔ 2. Debugging and testing are tightly intertwined. RQ1 ✘ ~
  • 18. What can we do? As educators, integrate debugging into courses. Teach debugging hands-on, not only abstractly. As debugger developers, care about usability first and number of features later. - Back-in-time debuggers - Live REPL - Domain-specific debuggers - Many small improvements can lead to a big improvement
  • 19. What did we do?
  • 20. “Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.” Brian Kernighan “