最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to configure Visual Studio Code for Python debugger with arguments - Stack Overflow

programmeradmin4浏览0评论

I am new in visual studio code configuration settings. When I try to use vs code to debug python with arguments, I select Start Debugging and Python Debugger:Current File with Arguments. The quotes are not added to the interpreter path and fail to launch.

As you can see in the attached picture, quotes are added to the interpreter path if Python Debugger: Python file is selected for Start Debugging.

launch.json file is created by vs code automatically. I have no idea how to solve this problem. Any suggestion to solve it?

"version": "0.2.0", "configurations": [ { "name": "Python Debugger: Current File with Arguments", "type": "debugpy", "request": "launch", "program": "${file}", "console": "integratedTerminal", "args": "${command:pickArgs}" } ]

I am new in visual studio code configuration settings. When I try to use vs code to debug python with arguments, I select Start Debugging and Python Debugger:Current File with Arguments. The quotes are not added to the interpreter path and fail to launch.

As you can see in the attached picture, quotes are added to the interpreter path if Python Debugger: Python file is selected for Start Debugging.

launch.json file is created by vs code automatically. I have no idea how to solve this problem. Any suggestion to solve it?

"version": "0.2.0", "configurations": [ { "name": "Python Debugger: Current File with Arguments", "type": "debugpy", "request": "launch", "program": "${file}", "console": "integratedTerminal", "args": "${command:pickArgs}" } ]

Share Improve this question asked Mar 11 at 3:40 huangjjhuangjj 154 bronze badges 1
  • Looks like this is a known issue. Here is git hub link for this issue github/microsoft/vscode-python-debugger/issues/233 I don't see solution from the link. – huangjj Commented Mar 11 at 5:58
Add a comment  | 

1 Answer 1

Reset to default 1

Use

      "args": [
                "${command:pickArgs}"
            ],
"configurations": [
    {
      "name": "Python Debugger: Current File with Arguments",
      "type": "debugpy",
      "request": "launch",
      "program": "${file}",
      "console": "integratedTerminal",
      "args": [
                "${command:pickArgs}"
            ]
    }
发布评论

评论列表(0)

  1. 暂无评论