关于visual-studio-code:mac实现vscode调试python代码

8次阅读

共计 331 个字符,预计需要花费 1 分钟才能阅读完成。

问题:下载里 python 扩大后仍不能单点调试代码
起因:未做配置

配置如下:

  1. 关上 vscode 的设置,搜寻 python.pythonPath,配置 python 依照门路,本人的依照门路能够在终端输出
which python3

如下图填写:

  1. 去 lunch.json 配置

如下图点击 1 处,再点击 2 处,再再 3 处增加框中所示,为不便粘贴,增加配置在上面:

{
    "name": "Python: currenfile",
    "type": "python",
    "request": "launch",
    "program":"${file}",
    "console":"integratedTerminal"
}

  1. 至此,实现,在上图 2 处抉择你配置的 currentfile,点击上图 2 处的▶️图标执行,就能够断点调试了。

正文完
 0