谷歌大神又一开源神器!代码调试不选它选谁?
链接:https://medium.com/analytics-vidhya/cyberbrain-python-debugging-redefined-1db4c47a4d32
回溯变量更改
查看程序执行的每个状态,包括变量的值
循环调试
pip install cyberbrain
code --install-extension laike9m.cyberbrain
from cyberbrain import trace
# As of now, you can only have one @trace decorator in the whole program.
# We may change this in version 2.0, see https://github.com/laike9m/Cyberbrain/discussions/73
@trace # Disable tracing with `@trace(disabled=True)`
def foo():
...
@app.route("/")
@trace
def hello_world():
x = [1, 2, 3]
return "Hello, World!"
由于实现非常复杂,因此存在一些已知的错误,不过随着更新,应该会变得更好。
评论