1. 安装python debugger
2. work directory新建.vscode/launch.json
3. 配置
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: b01",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/src/main.py",
"console": "integratedTerminal",
"args": [
"--file", "/home/quzhi/Desktop/VeriCodegen/bench/b01/b01.v",
"--top", "b01",
"--output", "/home/quzhi/Desktop/VeriCodegen/bench/b01/f.sv"
]
},
{
"name": "VeriCodeGen: or1200",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/src/main.py",
"args": [
"--filelist",
"/home/ziyue/researchlib/Micro_Eletronic/VeriCodegen/bench/or1200/filelist.f",
"--top",
"or1200_cpu",
"--output",
"/home/ziyue/researchlib/Micro_Eletronic/VeriCodegen/bench/or1200/f_or1200.v",
"--force"
],
"console": "integratedTerminal"
},
]
}
4. 打断点运行
单步跳过(Step Over)
作用:执行当前这一行代码,但如果这一行是函数调用,则不进入函数内部。 F10
单步进入(Step Into)
作用:执行当前行代码,并且如果是函数调用,就会跳进函数体内继续调试。 F11
单步跳出(Step Out)
作用:当前在函数内部时,执行完当前函数剩下的内容并跳回调用处。 Shift + F11
继续运行到下一个断点(Continue) F5