microsoft / microsoft/vscode-cpptools

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

Open
#6,805 15 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug debugger investigate: repro
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with the supplied launch.json, the C/C++ extension, VS Code 1.49.0, and WSL CentOS 7, correcting the shown externalConsole value if needed. Compare pressing F5 with externalConsole enabled and disabled; done when the external terminal opens and the debugger starts normally, with debugger commands usable as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux, vscode
Domain
devtools, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.