423,851 Members | 2,680 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,851 IT Pros & Developers. It's quick & easy.

What command do we use to debug a Python program?

P: 5
What command do we use to debug a Python program?
4 Weeks Ago #1
Share this Question
Share on Google+
1 Reply


P: 5
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.
4 Weeks Ago #2

Post your reply

Sign in to post your reply or Sign up for a free account.