AtBS 10 Debugging Flashcards
What is the message that is returned when there is an error in the code called?
Traceback message
How to gracefully handle an error and keep going with your program?
Use the traceback.format_exc() command
pg 218
What is a sanity check to make sure your code is not doing something obviously wrong?
an assertion
pg 219
What does an assert statement contain?
The assert key word
A condition that evaluates to TRUE or FALSE
A comma
A string to display when the condition evaluates to false
What are the levels of logging from least to most serious?
DEBUG
INFO
WARNING
ERROR
CRITICAL
pg 223
How to get debugger to finish the program?
Click “GO” to run the rest of the program
How to get debugger to run one line of code at a time?
Click “STEP” to run one line of the program at a time
How to set break points?
In the program file right click and select “Set Breakpoint”
Breakpoint line will highlight in yellow