What command do I use to Debug a Python Program?
Debug a Python Program
Collapse
X
-
Tags: None
-
To start debugging, we first open the command prompt, and get to the location the file is at.
Microsoft Windows [Version 10.0.16299.248]
(c) 2017 Microsoft Corporation. All rights reserved.
C:\Users\lifei> cd Desktop
C:\Users\lifei\ Desktop>
Then, we run the following command (for file try.py):
C:\Users\lifei\ Desktop>python -m pdb try.py
> c:\users\lifei\ desktop\try.py( 1)<module>()
-> for i in range(5):
(Pdb)
Then, we can start debugging.
Comment