Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
course-material
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IT1901
course-material
Commits
8a568330
Commit
8a568330
authored
7 months ago
by
George Adrian Stoica
Browse files
Options
Downloads
Patches
Plain Diff
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
7 months ago
Stage: build
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lectures/revealjs/07-debugging.adoc
+122
-0
122 additions, 0 deletions
lectures/revealjs/07-debugging.adoc
with
122 additions
and
0 deletions
lectures/revealjs/07-debugging.adoc
0 → 100644
+
122
−
0
View file @
8a568330
= 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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment