谷歌大神又一開源神器!代碼調(diào)試不選它選誰?
鏈接:https://medium.com/analytics-vidhya/cyberbrain-python-debugging-redefined-1db4c47a4d32

回溯變量更改
查看程序執(zhí)行的每個(gè)狀態(tài),包括變量的值
循環(huán)調(diào)試
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!"




由于實(shí)現(xiàn)非常復(fù)雜,因此存在一些已知的錯(cuò)誤,不過隨著更新,應(yīng)該會(huì)變得更好。

評(píng)論
圖片
表情
