SlideShare a Scribd company logo
2
Most read
3
Most read
4
Most read
Debug a java program
Bug and Debug
• Bug – logical error in your program
• Debug – process of finding what the error is
and fixing it
• Debugger – tool which helps the developer to
debug the problem code.
Eclipse Debugger
• Start debugging the program
• Control the flow of execution as the program
moves from one line to the next
• At each line, inspect the values of the
variables and see how they change as the
program runs.
• Debugger tool should allow you to stop the
program and inspect values.
Debugging Steps
•
•
•
•
•

•
•
•
•

Start the program in debug mode
Stop running the program at a certain point – breakpoint
Breakpoints – create, delete, disable, enable.
Breakpoint is a certain line in your program.
Inspect variables, evaluate expressions when you are at
breakpoints.
Continue your program from one breakpoint to another.
Step in, Step out, Step over.
Pop up in the stack trace.
Stop the debugger.

More Related Content

What's hot (20)

PPTX
Jira
Sun Technlogies
 
PPS
Java Presentation
aitrichtech
 
PPTX
Android Device Hardening
anupriti
 
PDF
Java IO
UTSAB NEUPANE
 
PDF
Kotlin vs Java | Edureka
Edureka!
 
PPTX
Training on Core java | PPT Presentation | Shravan Sanidhya
Shravan Sanidhya
 
PPTX
Jdk,jre,jvm
Kritika Goel
 
PPT
Introduction to Java Programming, Basic Structure, variables Data type, input...
Mr. Akaash
 
PPTX
Java history, versions, types of errors and exception, quiz
SAurabh PRajapati
 
PPTX
Java applet
Elizabeth alexander
 
PPTX
Control Statements in Java
Niloy Saha
 
PDF
software engineering
Azad public school
 
PDF
Introduction to Java Programming
Ravi Kant Sahu
 
PDF
Chapter 6 software metrics
despicable me
 
ODP
Basic of Java
Ajeet Kumar Verma
 
PPT
Java-java virtual machine
Surbhi Panhalkar
 
PPTX
Inheritance, friend function, virtual function, polymorphism
Jawad Khan
 
PPTX
Presentation on Core java
mahir jain
 
PDF
Software testing axioms
vijayalakshmijanakir1
 
Java Presentation
aitrichtech
 
Android Device Hardening
anupriti
 
Java IO
UTSAB NEUPANE
 
Kotlin vs Java | Edureka
Edureka!
 
Training on Core java | PPT Presentation | Shravan Sanidhya
Shravan Sanidhya
 
Jdk,jre,jvm
Kritika Goel
 
Introduction to Java Programming, Basic Structure, variables Data type, input...
Mr. Akaash
 
Java history, versions, types of errors and exception, quiz
SAurabh PRajapati
 
Java applet
Elizabeth alexander
 
Control Statements in Java
Niloy Saha
 
software engineering
Azad public school
 
Introduction to Java Programming
Ravi Kant Sahu
 
Chapter 6 software metrics
despicable me
 
Basic of Java
Ajeet Kumar Verma
 
Java-java virtual machine
Surbhi Panhalkar
 
Inheritance, friend function, virtual function, polymorphism
Jawad Khan
 
Presentation on Core java
mahir jain
 
Software testing axioms
vijayalakshmijanakir1
 

Viewers also liked (7)

PPTX
Java dates
Sujit Kumar
 
PPTX
Java enum
Sujit Kumar
 
PPTX
Introduction to java exceptions
Sujit Kumar
 
PPTX
Java interfaces
Sujit Kumar
 
PPTX
Java final keyword
Sujit Kumar
 
PPT
Java Web Development Course
Sujit Kumar
 
PPTX
Java file paths
Sujit Kumar
 
Java dates
Sujit Kumar
 
Java enum
Sujit Kumar
 
Introduction to java exceptions
Sujit Kumar
 
Java interfaces
Sujit Kumar
 
Java final keyword
Sujit Kumar
 
Java Web Development Course
Sujit Kumar
 
Java file paths
Sujit Kumar
 
Ad

Similar to Debug a java program (20)

PPT
6) debugging and testing
techbed
 
PPTX
Debbuging
Iama Marsian
 
PDF
JavaScript - Chapter 15 - Debugging Techniques
WebStackAcademy
 
PDF
Debugging in Software Engineering SE Unit-4 Part-6.pdf
iron57441
 
PPT
debugging (1).ppt
jerlinS1
 
PPT
An important characteristic of a test suite that is computed by a dynamic ana...
jeyasrig
 
PPTX
Notes on Debugging
Cotap Engineering
 
PPTX
Ss debuggers
sweety enit
 
PPT
PHP - Introduction to PHP Bugs - Debugging
Vibrant Technologies & Computers
 
PPT
Error Correction Techniques
Kelly Bauer
 
PPTX
Debugging
Ajeng Savitri
 
PDF
javabasics_ programming development chapter01
Udeshg90
 
DOCX
Materials for teachers and students java-en
Georgeta Manafu
 
PPTX
Week 4 - 5 Debugging Code and Analyzing Logic Errors.pptx
michael572640
 
PPTX
Debugging (Part 2)
Ajeng Savitri
 
PPTX
Debugging
Jonathan Holloway
 
PPTX
Interactive debugging system
Florence priyadarshini
 
PPT
Ch01 basic-java-programs
James Brotsos
 
PPTX
Java Debugging Tips @oredev
Martin (高馬丁) Skarsaune
 
6) debugging and testing
techbed
 
Debbuging
Iama Marsian
 
JavaScript - Chapter 15 - Debugging Techniques
WebStackAcademy
 
Debugging in Software Engineering SE Unit-4 Part-6.pdf
iron57441
 
debugging (1).ppt
jerlinS1
 
An important characteristic of a test suite that is computed by a dynamic ana...
jeyasrig
 
Notes on Debugging
Cotap Engineering
 
Ss debuggers
sweety enit
 
PHP - Introduction to PHP Bugs - Debugging
Vibrant Technologies & Computers
 
Error Correction Techniques
Kelly Bauer
 
Debugging
Ajeng Savitri
 
javabasics_ programming development chapter01
Udeshg90
 
Materials for teachers and students java-en
Georgeta Manafu
 
Week 4 - 5 Debugging Code and Analyzing Logic Errors.pptx
michael572640
 
Debugging (Part 2)
Ajeng Savitri
 
Interactive debugging system
Florence priyadarshini
 
Ch01 basic-java-programs
James Brotsos
 
Java Debugging Tips @oredev
Martin (高馬丁) Skarsaune
 
Ad

More from Sujit Kumar (20)

PPTX
Introduction to OOP with java
Sujit Kumar
 
PPTX
SFDC Database Basics
Sujit Kumar
 
PPTX
SFDC Database Security
Sujit Kumar
 
PPTX
SFDC Social Applications
Sujit Kumar
 
PPTX
SFDC Other Platform Features
Sujit Kumar
 
PPTX
SFDC Outbound Integrations
Sujit Kumar
 
PPTX
SFDC Inbound Integrations
Sujit Kumar
 
PPTX
SFDC UI - Advanced Visualforce
Sujit Kumar
 
PPTX
SFDC UI - Introduction to Visualforce
Sujit Kumar
 
PPTX
SFDC Deployments
Sujit Kumar
 
PPTX
SFDC Batch Apex
Sujit Kumar
 
PPTX
SFDC Data Loader
Sujit Kumar
 
PPTX
SFDC Advanced Apex
Sujit Kumar
 
PPTX
SFDC Introduction to Apex
Sujit Kumar
 
PPTX
SFDC Database Additional Features
Sujit Kumar
 
PPTX
Introduction to SalesForce
Sujit Kumar
 
PPTX
More about java strings - Immutability and String Pool
Sujit Kumar
 
PPTX
Hibernate First and Second level caches
Sujit Kumar
 
PPTX
Java equals hashCode Contract
Sujit Kumar
 
PPTX
Java Comparable and Comparator
Sujit Kumar
 
Introduction to OOP with java
Sujit Kumar
 
SFDC Database Basics
Sujit Kumar
 
SFDC Database Security
Sujit Kumar
 
SFDC Social Applications
Sujit Kumar
 
SFDC Other Platform Features
Sujit Kumar
 
SFDC Outbound Integrations
Sujit Kumar
 
SFDC Inbound Integrations
Sujit Kumar
 
SFDC UI - Advanced Visualforce
Sujit Kumar
 
SFDC UI - Introduction to Visualforce
Sujit Kumar
 
SFDC Deployments
Sujit Kumar
 
SFDC Batch Apex
Sujit Kumar
 
SFDC Data Loader
Sujit Kumar
 
SFDC Advanced Apex
Sujit Kumar
 
SFDC Introduction to Apex
Sujit Kumar
 
SFDC Database Additional Features
Sujit Kumar
 
Introduction to SalesForce
Sujit Kumar
 
More about java strings - Immutability and String Pool
Sujit Kumar
 
Hibernate First and Second level caches
Sujit Kumar
 
Java equals hashCode Contract
Sujit Kumar
 
Java Comparable and Comparator
Sujit Kumar
 

Recently uploaded (20)

PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
July Patch Tuesday
Ivanti
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
July Patch Tuesday
Ivanti
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 

Debug a java program

  • 1. Debug a java program
  • 2. Bug and Debug • Bug – logical error in your program • Debug – process of finding what the error is and fixing it • Debugger – tool which helps the developer to debug the problem code.
  • 3. Eclipse Debugger • Start debugging the program • Control the flow of execution as the program moves from one line to the next • At each line, inspect the values of the variables and see how they change as the program runs. • Debugger tool should allow you to stop the program and inspect values.
  • 4. Debugging Steps • • • • • • • • • Start the program in debug mode Stop running the program at a certain point – breakpoint Breakpoints – create, delete, disable, enable. Breakpoint is a certain line in your program. Inspect variables, evaluate expressions when you are at breakpoints. Continue your program from one breakpoint to another. Step in, Step out, Step over. Pop up in the stack trace. Stop the debugger.