Skip to content

Debugger hangs starting gdb.exe on Windows 10 with UTF-8 enabled. #1527

@weinand

Description

@weinand

From @leoliuasia on February 7, 2018 6:6

  • VSCode Version:1.19.3
  • OS Version: Windows 10 Pro 1709 16299.214

Steps to Reproduce:

  1. Debug->Start Debugging
  2. Nothing happens.... just hang in there with little blue block progressbar scrolling...

But when I force end task for gdb.exe in task manager window, vscode shows up an error, and little blue block disappears.

c_cpp_properties.json:

{
            "name": "Win32",
            "includePath": [
                "${workspaceRoot}",
                "C:\\MinGW\\lib\\gcc\\mingw32\\6.3.0\\include\\c++"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE"
            ],
            "intelliSenseMode": "msvc-x64",
            "browse": {
                "path": [
                    "${workspaceRoot}",
                    "C:\\MinGW\\lib\\gcc\\mingw32\\6.3.0\\include\\c++"
                ],
                "limitSymbolsToIncludedHeaders": true,
                "databaseFilename": ""
            }
        }

task.json:

"tasks": [
        {
            "label": "build cpp",
            "type": "shell",
            "command": "g++",
            "args": [
                "-g",
                "-o",
                "a.out",
                "main.cpp",
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]

launch.json

"configurations": [
        {
            "name": "(gdb) Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}\\a.out",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": true,
            "MIMode": "gdb",
            "miDebuggerPath": "C:\\MinGW\\bin\\gdb.exe",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ]
        }
    ]

Copied from original issue: microsoft/vscode#43075

Metadata

Metadata

Assignees

Labels

bugdebuggerfixedCheck the Milestone for the release in which the fix is or will be available.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions