vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

Set externalConsole to true does not open terminal, and the debugger just hangs.

Open FavonianKong opened this issue 5 years ago • 11 comments

Type: Debugger

Describe the bug

  • OS and Version: Window 10 1093 + WSL Centos 7

  • VS Code Version: 1.49.0

  • C/C++ Extension Version: 1.1.3

  • Other extensions you installed (and if the issue persists after disabling them):

    There's no special software.

  • A clear and concise description of what the bug is.

    When I set externalConsole in launch.json to true, pressing F5 will fail to start the debugger, the debugger just hangs. If externalConsole is set to false, the debug function works fine, but instructions in DEBUG CONSOLE e.g. bt or p var are invalid. What a dilemma it is :(

To Reproduce Please include a code sample and launch.json configuration.

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(gdb) Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "xxx/build_20.13.1.1/programs/myprograms",
            "args": [
                "--server",
                "-C",
                "config.xml"
            ],
            "stopAtEntry": false,
            "cwd": "xxx/build_20.13.1.1/programs",
            "environment": [],
            "externalConsole": ture,   // if set to false,it works fine
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ]
        }
    ]
}

I've seen similar problems in the VsCode community, and they think the problem is caused by extension. Any idea?https://github.com/microsoft/vscode/issues/111160#issuecomment-732000615

FavonianKong avatar Jan 18 '21 03:01 FavonianKong

There is an issue with VS Code launching an external window with WSL. This would need to be investigated since we request RunInTerminal with external console, but they may be reporting that the window is succeeding.

WardenGnaw avatar Jan 20 '21 01:01 WardenGnaw

This issue has been closed automatically because it's labeled as 'external'.

github-actions[bot] avatar Jan 20 '21 11:01 github-actions[bot]

This issue has been closed automatically because it has not had recent activity.

github-actions[bot] avatar Jul 20 '21 11:07 github-actions[bot]

It seems this bug have not been resolved, is anyone handling it?

Alaskra avatar Jul 23 '23 11:07 Alaskra

related issue: #1772

Alaskra avatar Jul 23 '23 11:07 Alaskra

yes indeed. the issue is still bothering me.

Kellermaan avatar Oct 30 '23 06:10 Kellermaan

I also meet this problem. After I update vscode to the newest edition, Set externalConsole to true doesn't work.

yizhilsy avatar Dec 06 '23 16:12 yizhilsy

Same problem here. externalConsole true = application doesn't run, debugger hangs. Set to false it doesn't output at all.

Not using wsl it works fine so it definitely is a wsl/vscode problem.

nepp95 avatar Jan 18 '24 20:01 nepp95

Same problem here.... It's so convenient to close issues automatically when there is no recent activity. Problems just go away, it's magic !!

DavidC-75 avatar Jan 31 '24 00:01 DavidC-75

I am also having the same issue!

rafael-solorzano avatar Mar 13 '24 08:03 rafael-solorzano

3 years later... hello?

totszwai avatar Aug 14 '24 13:08 totszwai

Is this not identical to https://github.com/microsoft/vscode-cpptools/issues/1772? And this one should thus be closed.

Both seem to be about WSL and "externalConsole": true not working.

thernstig avatar Sep 12 '24 14:09 thernstig

pls help! "externalConsole": true is definitely not working

Andrew-S-Jing avatar Nov 08 '24 19:11 Andrew-S-Jing

same issue... almost 4 years later D:

Benjam0 avatar Dec 13 '24 18:12 Benjam0