Debugging Flashcards

1
Q

describe the difference between run and debug configurations

A

a run configuration will ignore any breakpoints etc.

debug will stop and open a debugging window

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what is debugging

A

the process of finding and fixing errors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

describe the steps of debugging

A

start with a problem, run the code, get to understand the expected behaviour

stabilise the problem

isolate the source

fix

test

look for similar errors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

describe how we would stabilise a problem

A

narrow it down to a precise statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what types of errors are there

A

compile time

run time

semantic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

describe the scientific method of debugging

A

develop general theories

make observations

think of interesting questions

create a hypothesis

develop testable prediction

get data

refine

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

give some strategies to isolate the source of a problem (5)

A

brute force- walk through code

back track- start at problem and go backwards

architectural- suss out the location of the error

binary search- find the middle of the execution and work out if it was before or after that point

cause elimination- identify possibilities and rule out

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

give some tactics for isolating the source of a problem (8)

A

print statements

rubber ducking

minimise execution path

common problem knowledge

online debugger

test cases

look at commits

profiling (memory management in c)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly