Skip to content
Snippets Groups Projects
Commit 8a568330 authored by George Adrian Stoica's avatar George Adrian Stoica
Browse files

docs: adds slides for the 7th lecture

parent 93a08627
No related branches found
No related tags found
No related merge requests found
Pipeline #293333 passed
= Debugging
:customcss: slides.css
:icons: font
:includedir: includes/
:LECTURE_TOPIC: Debugging
:LECTURE_NO: 7th lecture
include::{includedir}header.adoc[]
[.smaller-80][.center-paragraph]
IT1901 Fall 2024 - {LECTURE_NO}
[background-color = "#124990"]
[color = "#fff6d5"]
== Overview
[.smaller-80]
- Administrative issues
- Debugging
- Summary
[background-color = "#124990"]
[color = "#fff6d5"]
== Administrative issues
== 1st individual exercise
- 2 thirds got it approved
- last chance to deliver
- mandatory exercise
- new deadline 03.10.2024 23:59
== Approaching Deadlines
- Torsdag, 03. oktober / 23:59
** 1st individual exercise
- Torsdag, 10. oktober / 23:59
** 2nd group deliverable
== Next Lecture
* focus on advanced source code management
* go through the materials before the lecture
* more interactive
[background-color = "#124990"]
[color = "#fff6d5"]
== Debugging
== Debugging
- important part of software development
- process of finding and fixing faults
- apparently term became popular in 1940s - Grace Hopper moth inside a computer
- “bug” was used by Thomas Edison to describe a defect in a technical system 1870s
== Debugger
- tool that allows developer to
** inspect values
** run step by step
** set "breakpoints"
== Why not printing?
- you can use sysout or logs to help
- it tends to polute the actual code
- gets unmanageable very fast in more complex projects
== Isn`t unit testing enough?
- testing and unit testing are useful and necessary
- not a replacement for debugging
- using debugging we can see what is happening in the code not passing the test
- tests are code too - you can debug the code in your tests as well
== Breakpoints
- developer can mark certain spots in the code where the execution should pause
- at the breakpoint one can decide how to continue
- one can inspect existing variables and also custom expressions
== Debugging commands
- Step into - follow code into methods, one step at a time
- Step over - go to the next line whithout going into methods
- Step out - run to the end of the method and go out to the caller code
- Continue - run until finding another breakpoint
== Advanced debugging
- conditional breakpoints - excution stops when a condition is met
- expressions - (watch) - code that evaluates at debug time
- changing values of runtime variables
== Typical uses
- correcting errors in code
- tracing the code paths
- understanding difficult or unfamiliar code
[background-color = "#124990"]
[color = "#fff6d5"]
== Debugging Demo
== Questions ?
[background-color = "#124990"]
[color = "#fff6d5"]
== Summary
include::{includedir}footer.adoc[]
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment