microsoft / microsoft/vscode-cpptools

File named with odd Chinese characters fails to run

Open
#13,314 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug debugger help wanted world ready
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Environment
  • OS and version: Windows 10, 10.0.19045 Build 19045
  • VS Code: 1.97.2
  • C/C++ extension: 1.23.6
  • OS and version of remote machine (if applicable):
  • GDB / LLDB version: GNU gdb (GDB for MinGW-W64 x86_64, built by Brecht Sanders, r3) 15.1
Bug Summary and Steps to Reproduce

Bug Summary:
MinGW g++ cannot output an executable file named by Chinese. I modified tasks.json and launch.json so that it output a.exe and the debugger runs it. It worked well one month ago, but broken now. Files with odd Chinese characters get stuck when the debugger tries to run while files named by even Chinese characters or English runs normally.

It is worth noting that the executable file a.exe is generated by the compiler in both situations and can be executed manually. In other words, the problem might be in the launch process.

The following video

  1. shows the configurations
  2. runs a file with even Chinese characters (OK)
  3. runs a file with odd Chinese characters (stuck)
  4. manually runs the executable file.

https://github.com/user-attachments/assets/a0dcf253-10ff-44ff-9b67-459dfdf59ccd

Debugger Configurations
{
    "tasks": [
        {
            "type": "cppbuild",
            "label": "C/C++: g++.exe build active file",
            "command": "C:/Program Files/mingw64/bin/g++.exe",
            "args": [
                "-fdiagnostics-color=always",
                "-g",
                "${file}",
                "-o",
                "${fileDirname}\\a.exe"
            ],
            "options": {
                "cwd": "C:/Program Files/mingw64/bin"
            },
            "problemMatcher": [
                "$gcc"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "detail": "Task generated by Debugger."
        },
    ],
    "version": "2.0.0"
}

   
{
    "configurations": [
        {
            "name": "Black",
            "type": "cppdbg",
            "request": "launch",
            "program": "${fileDirname}\\a.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "C:/Program Files/mingw64/bin",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "miDebuggerPath": "C:\\Program Files\\mingw64\\bin\\gdb.exe",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "description": "Set Disassembly Flavor to Intel",
                    "text": "-gdb-set disassembly-flavor intel",
                    "ignoreFailures": true
                }
            ],
            "preLaunchTask": "C/C++: g++.exe build active file"
        },
    ],
    "version": "2.0.0"
}
Debugger Logs
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (90) LaunchOptions{\"name\":\"Black\",\"type\":\"cppdbg\",\"request\":\"launch\",\"program\":\"D:\\\\Temp\\\\test\\\\a.exe\",\"args\":[],\"stopAtEntry\":false,\"cwd\":\"C:/Program Files/mingw64/bin\",\"environment\":[],\"externalConsole\":false,\"MIMode\":\"gdb\",\"miDebuggerPath\":\"C:\\\\Program Files\\\\mingw64\\\\bin\\\\gdb.exe\",\"setupCommands\":[{\"description\":\"Enable pretty-printing for gdb\",\"text\":\"-enable-pretty-printing\",\"ignoreFailures\":true},{\"description\":\"Set Disassembly Flavor to Intel\",\"text\":\"-gdb-set disassembly-flavor intel\",\"ignoreFailures\":true}],\"preLaunchTask\":\"C/C++: g++.exe build active file\",\"logging\":{\"engineLogging\":true,\"trace\":true,\"traceResponse\":true},\"configSource\":\"workspaceFolder\",\"detail\":\"preLaunchTask: C/C++: g++.exe build active file\",\"existing\":true,\"isDefault\":true,\"debuggerEvent\":\"playButton\",\"debugType\":\"run\",\"__sessionId\":\"dd024d87-e858-43ca-849c-6da61813b84c\"}\r\n"},"seq":2}
1: (90) LaunchOptions{"name":"Black","type":"cppdbg","request":"launch","program":"D:\\Temp\\test\\a.exe","args":[],"stopAtEntry":false,"cwd":"C:/Program Files/mingw64/bin","environment":[],"externalConsole":false,"MIMode":"gdb","miDebuggerPath":"C:\\Program Files\\mingw64\\bin\\gdb.exe","setupCommands":[{"description":"Enable pretty-printing for gdb","text":"-enable-pretty-printing","ignoreFailures":true},{"description":"Set Disassembly Flavor to Intel","text":"-gdb-set disassembly-flavor intel","ignoreFailures":true}],"preLaunchTask":"C/C++: g++.exe build active file","logging":{"engineLogging":true,"trace":true,"traceResponse":true},"configSource":"workspaceFolder","detail":"preLaunchTask: C/C++: g++.exe build active file","existing":true,"isDefault":true,"debuggerEvent":"playButton","debugType":"run","__sessionId":"dd024d87-e858-43ca-849c-6da61813b84c"}
--> C (runInTerminal-4): {"type":"request","command":"runInTerminal","arguments":{"kind":"integrated","title":"cppdbg: a.exe","cwd":"","args":["c:\\Users\\Galaxy\\.vscode\\extensions\\ms-vscode.cpptools-1.23.6-win32-x64\\debugAdapters\\bin\\WindowsDebugLauncher.exe","--stdin=Microsoft-MIEngine-In-itgdpyzi.v0l","--stdout=Microsoft-MIEngine-Out-oe34gr3y.40h","--stderr=Microsoft-MIEngine-Error-5npcp1wr.bli","--pid=Microsoft-MIEngine-Pid-j2ovapb3.v40","--dbgExe=C:\\Program Files\\mingw64\\bin\\gdb.exe","--interpreter=mi"],"env":{}},"seq":4}
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (162) Wait for connection completion.\r\n"},"seq":6}
1: (162) Wait for connection completion.
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1463) ->=thread-group-added,id=\"i1\"\r\n"},"seq":8}
1: (1463) ->=thread-group-added,id="i1"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1470) ->~\"GNU gdb (GDB for MinGW-W64 x86_64, built by Brecht Sanders, r3) 15.1\\n\"\r\n"},"seq":10}
1: (1470) ->~"GNU gdb (GDB for MinGW-W64 x86_64, built by Brecht Sanders, r3) 15.1\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1471) ->~\"Copyright (C) 2024 Free Software Foundation, Inc.\\n\"\r\n"},"seq":12}
1: (1471) ->~"Copyright (C) 2024 Free Software Foundation, Inc.\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1471) ->~\"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.\"\r\n"},"seq":14}
1: (1471) ->~"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."
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1472) ->~\"\\nType \\\"show copying\\\" and \\\"show warranty\\\" for details.\\n\"\r\n"},"seq":16}
1: (1472) ->~"\nType \"show copying\" and \"show warranty\" for details.\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1472) ->~\"This GDB was configured as \\\"x86_64-w64-mingw32\\\".\\n\"\r\n"},"seq":18}
1: (1472) ->~"This GDB was configured as \"x86_64-w64-mingw32\".\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1473) ->~\"Type \\\"show configuration\\\" for configuration details.\\n\"\r\n"},"seq":20}
1: (1473) ->~"Type \"show configuration\" for configuration details.\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1473) ->~\"For bug reporting instructions, please see:\\n\"\r\n"},"seq":22}
1: (1473) ->~"For bug reporting instructions, please see:\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1474) ->~\"<https://www.gnu.org/software/gdb/bugs/>.\\n\"\r\n"},"seq":24}
1: (1474) ->~"<https://www.gnu.org/software/gdb/bugs/>.\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1474) ->~\"Find the GDB manual and other documentation resources online at:\\n    <\"\r\n"},"seq":26}
1: (1474) ->~"Find the GDB manual and other documentation resources online at:\n    <"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1474) ->~\"http://www.gnu.org/software/gdb/documentation/>.\\n\\n\"\r\n"},"seq":28}
1: (1474) ->~"http://www.gnu.org/software/gdb/documentation/>.\n\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1474) ->~\"For help, type \\\"help\\\".\\n\"\r\n"},"seq":30}
1: (1474) ->~"For help, type \"help\".\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1474) ->~\"Type \\\"apropos word\\\" to search for commands related to \\\"word\\\".\\n\"\r\n"},"seq":32}
1: (1474) ->~"Type \"apropos word\" to search for commands related to \"word\".\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1474) ->(gdb)\r\n"},"seq":34}
1: (1474) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1479) <-1001-gdb-set mi-async on\r\n"},"seq":36}
1: (1479) <-1001-gdb-set mi-async on
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1499) ->1001^done\r\n"},"seq":38}
1: (1499) ->1001^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1500) ->(gdb)\r\n"},"seq":40}
1: (1500) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1500) ->&\"\\n\"\r\n"},"seq":42}
1: (1500) ->&"\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1500) ->^done\r\n"},"seq":44}
1: (1500) ->^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1500) ->(gdb)\r\n"},"seq":46}
1: (1500) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1502) 1001: elapsed time 24\r\n"},"seq":48}
1: (1502) 1001: elapsed time 24
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1506) <-1002-interpreter-exec console \"show configuration\"\r\n"},"seq":50}
1: (1506) <-1002-interpreter-exec console "show configuration"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1515) ->~\"This GDB was configured as follows:\\n   configure --host=\"\r\n"},"seq":52}
1: (1515) ->~"This GDB was configured as follows:\n   configure --host="
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1516) ->~\"x86_64-w64-mingw32 --target=x86_64-w64-mingw32\\n\"\r\n"},"seq":54}
1: (1516) ->~"x86_64-w64-mingw32 --target=x86_64-w64-mingw32\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1516) ->~\"\\t     --with-auto-load-dir=$debugdir:$datadir/auto-load\\n\\t     --with-auto-load-safe-path=\"\r\n"},"seq":56}
1: (1516) ->~"\t     --with-auto-load-dir=$debugdir:$datadir/auto-load\n\t     --with-auto-load-safe-path="
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1516) ->~\"$debugdir:$datadir/auto-load\\n\"\r\n"},"seq":58}
1: (1516) ->~"$debugdir:$datadir/auto-load\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1516) ->~\"\\t     --with-expat\\n\"\r\n"},"seq":60}
1: (1516) ->~"\t     --with-expat\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1516) ->~\"\\t     --with-gdb-datadir=/R/winlibs64ucrt_stage/inst_gdb-15.1/share/gdb/share/gdb (relocatable)\\n\"\r\n"},"seq":62}
1: (1516) ->~"\t     --with-gdb-datadir=/R/winlibs64ucrt_stage/inst_gdb-15.1/share/gdb/share/gdb (relocatable)\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1516) ->~\"\\t     --with-jit-reader-dir=/R/winlibs64ucrt_stage/inst_gdb-15.1/share/gdb/lib/gdb (relocatable)\\n\"\r\n"},"seq":64}
1: (1516) ->~"\t     --with-jit-reader-dir=/R/winlibs64ucrt_stage/inst_gdb-15.1/share/gdb/lib/gdb (relocatable)\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1516) ->~\"\\t     --without-libunwind-ia64\\n\"\r\n"},"seq":66}
1: (1516) ->~"\t     --without-libunwind-ia64\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1516) ->~\"\\t     --with-lzma\\n\"\r\n"},"seq":68}
1: (1516) ->~"\t     --with-lzma\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1517) ->~\"\\t     --without-babeltrace\\n\"\r\n"},"seq":70}
1: (1517) ->~"\t     --without-babeltrace\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1517) ->~\"\\t     --without-intel-pt\\n\"\r\n"},"seq":72}
1: (1517) ->~"\t     --without-intel-pt\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1517) ->~\"\\t     --with-xxhash\\n\"\r\n"},"seq":74}
1: (1517) ->~"\t     --with-xxhash\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1517) ->~\"\\t     --with-python=D:/Prog/winlibs64ucrt_stage/custombuilt/share/python\\n\"\r\n"},"seq":76}
1: (1517) ->~"\t     --with-python=D:/Prog/winlibs64ucrt_stage/custombuilt/share/python\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1517) ->~\"\\t     --with-python-libdir=/d/Prog/winlibs64ucrt_stage/custombuilt/share/python/lib\\n\"\r\n"},"seq":78}
1: (1517) ->~"\t     --with-python-libdir=/d/Prog/winlibs64ucrt_stage/custombuilt/share/python/lib\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1517) ->~\"\\t     --without-debuginfod\\n\"\r\n"},"seq":80}
1: (1517) ->~"\t     --without-debuginfod\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1517) ->~\"\\t     --with-curses\\n\"\r\n"},"seq":82}
1: (1517) ->~"\t     --with-curses\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1518) ->~\"\\t     --without-guile\\n\"\r\n"},"seq":84}
1: (1518) ->~"\t     --without-guile\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1518) ->~\"\\t     --without-amd-dbgapi\\n\"\r\n"},"seq":86}
1: (1518) ->~"\t     --without-amd-dbgapi\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1518) ->~\"\\t     --enable-source-highlight\\n\"\r\n"},"seq":88}
1: (1518) ->~"\t     --enable-source-highlight\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1518) ->~\"\\t     --enable-threading\\n\"\r\n"},"seq":90}
1: (1518) ->~"\t     --enable-threading\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1518) ->~\"\\t     --enable-tui\\n\"\r\n"},"seq":92}
1: (1518) ->~"\t     --enable-tui\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1518) ->~\"\\t     --without-system-readline\\n\"\r\n"},"seq":94}
1: (1518) ->~"\t     --without-system-readline\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1518) ->~\"\\t     --with-separate-debug-dir=/R/winlibs64ucrt_stage/inst_gdb-15.1/share/gdb/lib/debug (relocatable)\\n\"\r\n"},"seq":96}
1: (1518) ->~"\t     --with-separate-debug-dir=/R/winlibs64ucrt_stage/inst_gdb-15.1/share/gdb/lib/debug (relocatable)\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1558) ->~\"\\t     --with-system-gdbinit=/R/winlibs64ucrt_stage/inst_gdb-15.1/share/gdb/share/gdb/gdbinit (relocatable)\\n\"\r\n"},"seq":98}
1: (1558) ->~"\t     --with-system-gdbinit=/R/winlibs64ucrt_stage/inst_gdb-15.1/share/gdb/share/gdb/gdbinit (relocatable)\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1562) ->~\"\\n(\\\"Relocatable\\\" means the directory can be moved with the GDB installation\\ntree, and GDB will still find it.)\\n\"\r\n"},"seq":100}
1: (1562) ->~"\n(\"Relocatable\" means the directory can be moved with the GDB installation\ntree, and GDB will still find it.)\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1565) ->1002^done\r\n"},"seq":102}
1: (1565) ->1002^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1565) 1002: elapsed time 58\r\n"},"seq":104}
1: (1565) 1002: elapsed time 58
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1565) ->(gdb)\r\n"},"seq":106}
1: (1565) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1566) ->&\"\\n\"\r\n"},"seq":108}
1: (1566) ->&"\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1566) ->^done\r\n"},"seq":110}
1: (1566) ->^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1567) ->(gdb)\r\n"},"seq":112}
1: (1567) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/MIEngine/WindowsRuntime","data":{"VS.Diagnostics.Debugger.MIEngine.WindowsRuntime":"MinGW"}},"seq":114}
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1580) <-1003-enable-pretty-printing\r\n"},"seq":116}
1: (1580) <-1003-enable-pretty-printing
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1593) ->1003^done\r\n"},"seq":118}
1: (1593) ->1003^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1593) 1003: elapsed time 13\r\n"},"seq":120}
1: (1593) 1003: elapsed time 13
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1593) ->(gdb)\r\n"},"seq":122}
1: (1593) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1593) <-1004-gdb-set disassembly-flavor intel\r\n"},"seq":124}
1: (1593) <-1004-gdb-set disassembly-flavor intel
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1593) ->&\"\\n\"\r\n"},"seq":126}
1: (1593) ->&"\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1593) ->^done\r\n"},"seq":128}
1: (1593) ->^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1593) ->(gdb)\r\n"},"seq":130}
1: (1593) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1609) ->1004^done\r\n"},"seq":132}
1: (1609) ->1004^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1609) 1004: elapsed time 16\r\n"},"seq":134}
1: (1609) 1004: elapsed time 16
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1609) ->(gdb)\r\n"},"seq":136}
1: (1609) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1609) <-1005-interpreter-exec console \"set pagination off\"\r\n"},"seq":138}
1: (1609) <-1005-interpreter-exec console "set pagination off"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1609) ->&\"\\n\"\r\n"},"seq":140}
1: (1609) ->&"\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1610) ->^done\r\n"},"seq":142}
1: (1610) ->^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1610) ->(gdb)\r\n"},"seq":144}
1: (1610) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1625) ->=cmd-param-changed,param=\"pagination\",value=\"off\"\r\n"},"seq":146}
1: (1625) ->=cmd-param-changed,param="pagination",value="off"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1625) ->1005^done\r\n"},"seq":148}
1: (1625) ->1005^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1625) 1005: elapsed time 15\r\n"},"seq":150}
1: (1625) 1005: elapsed time 15
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1625) ->(gdb)\r\n"},"seq":152}
1: (1625) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1625) <-1006-gdb-set auto-solib-add on\r\n"},"seq":154}
1: (1625) <-1006-gdb-set auto-solib-add on
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1625) ->&\"\\n\"\r\n"},"seq":156}
1: (1625) ->&"\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1626) ->^done\r\n"},"seq":158}
1: (1626) ->^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1626) ->(gdb)\r\n"},"seq":160}
1: (1626) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1640) ->1006^done\r\n"},"seq":162}
1: (1640) ->1006^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1641) 1006: elapsed time 15\r\n"},"seq":164}
1: (1641) 1006: elapsed time 15
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1641) ->(gdb)\r\n"},"seq":166}
1: (1641) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1641) <-1007-gdb-set solib-search-path D:\\\\Temp\\\\test;\r\n"},"seq":168}
1: (1641) <-1007-gdb-set solib-search-path D:\\Temp\\test;
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1641) ->&\"\\n\"\r\n"},"seq":170}
1: (1641) ->&"\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1641) ->^done\r\n"},"seq":172}
1: (1641) ->^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1641) ->(gdb)\r\n"},"seq":174}
1: (1641) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1656) ->1007^done\r\n"},"seq":176}
1: (1656) ->1007^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1657) 1007: elapsed time 15\r\n"},"seq":178}
1: (1657) 1007: elapsed time 15
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1657) ->(gdb)\r\n"},"seq":180}
1: (1657) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1657) <-1008-environment-cd \"C:/Program Files/mingw64/bin\"\r\n"},"seq":182}
1: (1657) <-1008-environment-cd "C:/Program Files/mingw64/bin"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1657) ->&\"\\n\"\r\n"},"seq":184}
1: (1657) ->&"\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1657) ->^done\r\n"},"seq":186}
1: (1657) ->^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1657) ->(gdb)\r\n"},"seq":188}
1: (1657) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1672) ->1008^done\r\n"},"seq":190}
1: (1672) ->1008^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1672) 1008: elapsed time 15\r\n"},"seq":192}
1: (1672) 1008: elapsed time 15
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1672) <-1009-file-exec-and-symbols D:\\\\Temp\\\\test\\\\a.exe\r\n"},"seq":194}
1: (1672) <-1009-file-exec-and-symbols D:\\Temp\\test\\a.exe
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1672) ->(gdb)\r\n"},"seq":196}
1: (1672) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1673) ->&\"\\n\"\r\n"},"seq":198}
1: (1673) ->&"\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1674) ->^done\r\n"},"seq":200}
1: (1674) ->^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1674) ->(gdb)\r\n"},"seq":202}
1: (1674) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1693) ->1009^done\r\n"},"seq":204}
1: (1693) ->1009^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1693) 1009: elapsed time 20\r\n"},"seq":206}
1: (1693) 1009: elapsed time 20
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1693) ->(gdb)\r\n"},"seq":208}
1: (1693) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1693) <-1010-interpreter-exec console \"show architecture\"\r\n"},"seq":210}
1: (1693) <-1010-interpreter-exec console "show architecture"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1693) ->&\"\\n\"\r\n"},"seq":212}
1: (1693) ->&"\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1694) ->^done\r\n"},"seq":214}
1: (1694) ->^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1694) ->(gdb)\r\n"},"seq":216}
1: (1694) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1703) ->~\"The target architecture is set to \\\"auto\\\" (currently \\\"i386:x86-64\\\").\\n\"\r\n"},"seq":218}
1: (1703) ->~"The target architecture is set to \"auto\" (currently \"i386:x86-64\").\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1703) ->1010^done\r\n"},"seq":220}
1: (1703) ->1010^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1703) ->(gdb)\r\n"},"seq":222}
1: (1703) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1704) ->&\"\\n\"\r\n"},"seq":224}
1: (1704) ->&"\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1704) ->^done\r\n"},"seq":226}
1: (1704) ->^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1704) ->(gdb)\r\n"},"seq":228}
1: (1704) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1704) 1010: elapsed time 10\r\n"},"seq":230}
1: (1704) 1010: elapsed time 10
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1705) <-1011-exec-arguments 2>CON 1>CON <CON\r\n"},"seq":232}
1: (1705) <-1011-exec-arguments 2>CON 1>CON <CON
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1718) ->1011^done\r\n"},"seq":234}
1: (1718) ->1011^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1718) 1011: elapsed time 12\r\n"},"seq":236}
1: (1718) 1011: elapsed time 12
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1718) ->(gdb)\r\n"},"seq":238}
1: (1718) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1718) <-1012-break-insert -f main\r\n"},"seq":240}
1: (1718) <-1012-break-insert -f main
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1718) ->&\"\\n\"\r\n"},"seq":242}
1: (1718) ->&"\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1719) ->^done\r\n"},"seq":244}
1: (1719) ->^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1719) ->(gdb)\r\n"},"seq":246}
1: (1719) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (17862) Send Event AD7MessageEvent\r\n"},"seq":248}
1: (17862) Send Event AD7MessageEvent
--> E (output): {"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/Launch","data":{"VS.Diagnostics.Debugger.ImplementationName":"Microsoft.MIDebugEngine","VS.Diagnostics.Debugger.EngineVersion":"17.12.21003.1","VS.Diagnostics.Debugger.HostVersion":"17.12.21003.1","VS.Diagnostics.Debugger.AdapterId":"cppdbg","VS.Diagnostics.Debugger.Launch.ErrorCode":1005,"VS.Diagnostics.Debugger.Launch.IsError":true}},"seq":250}
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (17867) Send Event AD7ProgramDestroyEvent\r\n"},"seq":252}
1: (17867) Send Event AD7ProgramDestroyEvent
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"The program 'D:\\Temp\\test\\a.exe' has exited with code 42 (0x0000002a).\r\n\r\n"},"seq":255}
The program 'D:\Temp\test\a.exe' has exited with code 42 (0x0000002a).
--> E (output): {"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/DebugCompleted","data":{"VS.Diagnostics.Debugger.ImplementationName":"Microsoft.MIDebugEngine","VS.Diagnostics.Debugger.EngineVersion":"17.12.21003.1","VS.Diagnostics.Debugger.HostVersion":"17.12.21003.1","VS.Diagnostics.Debugger.AdapterId":"cppdbg","VS.Diagnostics.Debugger.DebugCompleted.BreakCounter":0}},"seq":257}
--> R (launch-2): {"type":"response","request_seq":2,"success":false,"command":"launch","message":"Unable to start debugging. GDB exited unexpectedly.","body":{"error":{"id":1005,"format":"Unable to start debugging. GDB exited unexpectedly."}},"seq":254}
--> E (output): {"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/MIEngine/DebuggerAborted","data":{"VS.Diagnostics.Debugger.MIEngine.DebuggerName":"GDB","VS.Diagnostics.Debugger.MIEngine.LastSentCommandName":"-break-insert"}},"seq":260}
Other Extensions

No response

Additional Information

No response

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

The report provides tasks.json, launch.json, the WindowsDebugLauncher.exe invocation, and GDB logs; start by reproducing the launch with odd and even Chinese filenames on Windows 10 and compare the debugger startup behavior. Done means the C/C++ debugger launches the generated executable successfully for both filename cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, typescript, vscode
Domain
devtools, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.