MANICX100
MANICX100

Reputation: 1369

VSCode run without debugging doesn't work

Using VSCode I can run my test python code by pressing the play icon top right.

This should = run without debugging but I get no output

I have tried adding python path to settings.json as per

vscode "Run Without Debugging" doesn't open Python Debug Console

but no change.

Not a big issue but any non workaround solutions.

Upvotes: 3

Views: 10515

Answers (3)

hephaestus13
hephaestus13

Reputation: 11

Recently stumbled upon the same problem myself. While running some tests on JavaScript(Node.js as runtime). On a script file with nothing, but a simple console.log('Works!'); it would not print out on the Debug Console using the default Node.js launch configuration. From what I understand it seems to be a Debugger issue of VS Code(ver-1.87). Possible solutions:

  1. It should be fixed in the nightly version here

  2. Install an older version version. Ver-1.83 is what specifically worked for me.

Upvotes: 1

I Fixed: Re-installing the debugger (in my case IntelliSense)

  1. File Menu "Run" - "Install Additional Debuggers..."
  2. Then in the actual debugger (Generally the first) select Uninstall
  3. Restart VScode
  4. File Menu "Run" - "Install Additional Debuggers..."
  5. Search and install the debugger again
  6. Try

Upvotes: 1

MingJie-MSFT
MingJie-MSFT

Reputation: 9209

I also updated a new answer in your post.

You can specify the shell in setting.json by adding the following code:

"terminal.integrated.shell.windows":"C:\\WINDOWS\\system32\\cmd.exe",

Of course, this method is outdated, and we will also receive warnings (but it will not affect its effectiveness):

enter image description here

According to the update of document, we can name the terminal and specify the default terminal in the following way:

    {
  "terminal.integrated.profiles.windows": {
    "My PowerShell": {
      "path": "pwsh.exe",
      "args": [
         "-noexit",
         "-file",
         "${env:APPDATA}\PowerShell\my-init-script.ps1"
      ]
    }
  },
  "terminal.integrated.defaultProfile.windows": "My PowerShell"
}

Upvotes: 0

Related Questions