How to step through Python code to help debug issues?

前端 未结 14 1068
梦如初夏
梦如初夏 2020-11-22 11:17

In Java/C# you can easily step through code to trace what might be going wrong, and IDE\'s make this process very user friendly.

Can you trace through python code in

14条回答
  •  独厮守ぢ
    2020-11-22 11:34

    There exist breakpoint() method nowadays, which replaces import pdb; pdb.set_trace().

    It also has several new features, such as possible environment variables.

提交回复
热议问题