VS Code starts debugging in integrated terminal instead of debug console

前端 未结 6 1181
一向
一向 2020-12-02 17:14

I\'ve been using VS Code for quite some time and just today I started having this strange issue. Previously if I started debugging an program (F5) it would start debugging a

6条回答
  •  隐瞒了意图╮
    2020-12-02 17:34

    The accepted answer didn't work for me as it doesn't appear to be an option on my version of VSCode Version 1.30.2 (1.30.2):

    Unknown console type 'none'.

    The solution for me was to use the internalConsole option instead. I suppose it must be defaulting to the integratedTerminal option on my version.

    Here is an example:

    NOTE: this is an example from my nodejs project but the console portion is still relevant regardless of project type. I have included more to show some context as well as other features such as envFile usage.

    ...    
    {
        "type": "node",
        "request": "launch",
        "name": "Launch Program",
        "envFile": "${workspaceRoot}/.env",
        "program": "${workspaceFolder}/src/index.js",
        "autoAttachChildProcesses": true,
        "console": "internalConsole"
    },
    ...
    

提交回复
热议问题