diff --git a/lectures/revealjs/07-debugging.adoc b/lectures/revealjs/07-debugging.adoc new file mode 100644 index 0000000000000000000000000000000000000000..adec94e24177a2abe643ee678e6b60bcbd24ef57 --- /dev/null +++ b/lectures/revealjs/07-debugging.adoc @@ -0,0 +1,122 @@ += 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