Hardware Reference
In-Depth Information
This opens up two consoles, Debug Output and Debug Variables (shown
in the following screenshot). The window Debug Output prints any output
of the program. If we included any print statements in our program, the
output is displayed in this window. This window can be used to view
any results, ensure that a particular callback function was executed, or
determine whether the program execution got past a particular line of
the program.
The Debug Variables window displays the state of variables as the program
is being executed. Both the windows are helpful in determining whether a
Python script was written as intended.
Debug terminals
When we start debugging a Python script, the toolbar at the top presents
us with two options, namely Step Over and Step In , as shown in the
following screenshot:
The Adafruit debug toolbar
In this example, it is possible to test the execution of commands by
stepping through each line of the script. This is really useful when devices
(for example, a pressure sensor) are not providing the intended output to
identify the root cause.
 
Search WWH ::




Custom Search