By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,797 Members | 1,262 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,797 IT Pros & Developers. It's quick & easy.

Debug a Python Program

P: 3
What command do I use to Debug a Python Program?
Apr 25 '19 #1
Share this Question
Share on Google+
2 Replies

P: 4
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

Then, we run the following command (for file

C:\Users\lifei\Desktop>python -m pdb
> c:\users\lifei\desktop\<module>()
-> for i in range(5):


Then, we can start debugging.
Apr 25 '19 #2

P: 115
You can use pdb Python debugger. Commands listed here.
Apr 25 '19 #3

Post your reply

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