Skip to content

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

Open

Description

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

Activity

  1. WardenGnaw commented on Jan 20, 2021

    @WardenGnaw
    Member

    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.

  2. added
    investigate: repro
    on Jan 20, 2021
  3. github-actions commented on Jan 20, 2021

    @github-actions

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

  4. github-actions commented on Jul 20, 2021

    @github-actions

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

  5. Alaskra commented on Jul 23, 2023

    @Alaskra

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

  6. Alaskra commented on Jul 23, 2023

    @Alaskra

    related issue: #1772

  7. Kellermaan commented on Oct 30, 2023

    @Kellermaan

    yes indeed. the issue is still bothering me.

  8. yizhilsy commented on Dec 6, 2023

    @yizhilsy

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

  9. nepp95 commented on Jan 18, 2024

    @nepp95

    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.

  10. DavidC-75 commented on Jan 31, 2024

    @DavidC-75

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

  11. rafael-solorzano commented on Mar 13, 2024

    @rafael-solorzano

    I am also having the same issue!

  12. totszwai commented on Aug 14, 2024

    @totszwai

    3 years later... hello?

  13. thernstig commented on Sep 12, 2024

    @thernstig

    Is this not identical to #1772? And this one should thus be closed.

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

  14. Andrew-S-Jing commented on Nov 8, 2024

    @Andrew-S-Jing

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

  15. Benjam0 commented on Dec 13, 2024

    @Benjam0

    same issue... almost 4 years later D:

  16. iyht commented on Dec 19, 2025

    @iyht

    got the same issue in 2025 ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdebuggerinvestigate: repro

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions