Skip to content

Unable to start debugging #4140

@MegaOwIer

Description

@MegaOwIer

Type: Debugger

Describe the bug

  • OS and Version: Windows 10 1903 x64 18362.295
  • VS Code Version: 1.37.1
  • C/C++ Extension Version: 0.25.0
  • Other extensions you installed (and if the issue persists after disabling them):
    • ms-python.python
    • ms-vscode-remote.remote-wsl
    • visualstudioexptteam.vscodeintellicode
    • ms-ceintl.vscode-language-pack-zh-hans
  • A clear and concise description of what the bug is.
    After pressing F5, the external terminal doesn't appear as expected, so I cannot start debugging normally.

launch.json:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "C++ Debug",
            "type": "cppdbg",
            "request": "launch",
            "program": "${fileDirname}\\${fileBasenameNoExtension}",
            "args": [],
            "stopAtEntry": true,
            "cwd": "${fileDirname}",
            "environment": [],
            "externalConsole": true,
            "internalConsoleOptions": "neverOpen",
            "MIMode": "gdb",
            "miDebuggerPath": "E:\\MinGW\\mingw64\\bin\\gdb.exe",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": false
                }
            ],
            "preLaunchTask": "Compile for Debug",
            "logging": {
                "engineLogging": true
            }
        }
    ]
}

logs:

1: (203) LaunchOptions<LocalLaunchOptions xmlns='http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014'
1: (224) LaunchOptions  ExePath='e:\Users\workspace\cur\attempt.exe'
1: (225) LaunchOptions  WorkingDirectory='e:\Users\workspace\cur'
1: (225) LaunchOptions  ExeArguments=''
1: (225) LaunchOptions  MIMode='gdb'
1: (225) LaunchOptions  MIDebuggerPath='E:\MinGW\mingw64\bin\gdb.exe'
1: (225) LaunchOptions  WaitDynamicLibLoad='false'
1: (225) LaunchOptions  ExternalConsole='true'
1: (225) LaunchOptions>
1: (226) LaunchOptions    <SetupCommands>
1: (226) LaunchOptions        <Command IgnoreFailures='false' Description='Enable pretty-printing for gdb'>-enable-pretty-printing</Command>
1: (226) LaunchOptions    </SetupCommands>
1: (226) LaunchOptions</LocalLaunchOptions>
1: (338) Starting: "E:\MinGW\mingw64\bin\gdb.exe" --interpreter=mi
1: (351) DebuggerPid=8512
1: (506) ->=thread-group-added,id="i1"
1: (508) ->~"GNU gdb (GDB) 8.1\n"
1: (508) ->~"Copyright (C) 2018 Free Software Foundation, Inc.\n"
1: (508) ->~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\nand \"show warranty\" for details.\n"
1: (508) ->~"This GDB was configured as \"x86_64-w64-mingw32\".\nType \"show configuration\" for configuration details."
1: (508) ->~"\nFor bug reporting instructions, please see:\n"
1: (508) ->~"<http://www.gnu.org/software/gdb/bugs/>.\n"
1: (508) ->~"Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/>.\n"
1: (508) ->~"For help, type \"help\".\n"
1: (508) ->~"Type \"apropos word\" to search for commands related to \"word\".\n"
1: (517) ->(gdb)
1: (521) <-1001-gdb-set target-async on
1: (521) ->&"\357\273\2771001-gdb-set target-async on\n"
1: (524) ->&"Undefined command: \"\".  Try \"help\".\n"
1: (524) ->^error,msg="Undefined command: \"\".  Try \"help\"."
1: (524) ->(gdb)
1: (524) ->&"\n"
1: (524) ->^done
1: (525) ->(gdb)
1: (535) Send Event AD7MessageEvent

sample code:

#include<bits/stdc++.h>
using namespace std;

int main() {
    ios::sync_with_stdio(false);
    int a, b;
    cin >> a >> b;
    cout << a + b << "\n";
    return 0;
}

To Reproduce
Please include a code sample and launch.json configuration.
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Additional context
If applicable, please include logging by adding "logging": { "engineLogging": true, "trace": true, "traceResponse": true } in your launch.json
Add any other context about the problem here including log or error messages in your Debug Console or Output windows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions