How to quickly debug misbehaving script in Python without pdb?

后端 未结 3 1112
感情败类
感情败类 2021-01-29 12:58

There is a high level logic error deep within my Python script, and pdb doesn\'t help to debug it. Is there any other way to see what is being executed after I run

3条回答
  •  执念已碎
    2021-01-29 13:35

    No, there's no magic formula.

    My best suggestion is to get a good IDE with a debugger, like JetBrains' PyCharm, and step through your code to see where you went wrong.

    Most of the time these situations happen because you make assumptions about behavior that aren't true. Get a debugger, step through, and check your assumptions.

提交回复
热议问题