Add prefix to debug command in VSCode

随声附和 提交于 2020-08-08 06:27:20

问题


I'm debugging a Python script. My configuration looks something like this:

{
  "name": "debug script.py",
  "type": "python",
  "request": "launch",
  "program": "/path/to/script.py",
  "console": "integratedTerminal"
}

When running the script, I need to prefix it with an executable aws-access to give myself access to certain resources on AWS (otherwise I get Permission Denied errors):

aws-access python script.py

How can I add this prefix to the debug command?

Note this is easy to do when executing my code using the Code Runner plugin:

"code-runner.executorMap": {
  "python": "aws-access $pythonPath -u $fullFileName"
}

来源:https://stackoverflow.com/questions/57797320/add-prefix-to-debug-command-in-vscode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!