随手记_vscode怎样加命令行参数进行调试(python)

vscode怎样加命令行参数进行调试

  • 1 点击vscode中的三角形,调试按钮;
  • 2 在调试工具窗口点设置图标,“打开launch.json”;
  • 3 在launch.json文件中的 configrations 项中添加 “args” 命令行参数,如下图所示。
  • (远程服务器调试同样适用,此时 launch.json新建在远程服务器端的项目文件下)

vscode 路径宏_VS code中的宏定义 ​​​​​​​

在launch.json中会使用到一些预定变量, 这些变量的具体含义如下

  • ${workspaceRoot} the path of the folder opened in VS Code(VSCode中打开文件夹的路径)
  • ${workspaceRootFolderName} the name of the folder opened in VS Code without any solidus (/)(VSCode中打开文件夹的路径, 但不包含"/")
  • ${file} the current opened file(当前打开的文件)
  • ${relativeFile} the current opened file relative to workspaceRoot(当前打开的文件,相对于workspaceRoot)
  • ${fileBasename} the current opened file's basename(当前打开文件的文件名, 不含扩展名)
  • ${fileDirname} the current opened file's dirname(当前打开文件的目录名)
  • ${fileExtname} the current opened file's extension(当前打开文件的扩展名)
  • ${cwd} the task runner's current working directory on startup()
     
  • 4
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

惊鸿一博

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值