Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vscode debug error:Unable to start debugging. Unexpected GDB output from command "-exec-run". During startup program exited with code 0xc0000139. #13126

Open
971766904 opened this issue Jan 8, 2025 · 0 comments
Labels

Comments

@971766904
Copy link

Environment

  • OS and version: win11
  • VS Code:
  • C/C++ extension:14.2.0
  • OS and version of remote machine (if applicable):
  • GDB / LLDB version:15.2

Bug Summary and Steps to Reproduce

Bug Summary: when I applied the vscode to debug my code, I get error messager :Unable to start debugging. Unexpected GDB output from command "-exec-run". During startup program exited with code 0xc0000139.

info:
I found that if there are 'std::list li={6,7,8,9};' and 'SigLF.push_back(1.0)' in my code. I see error:Unable to start debugging. Unexpected GDB output from command "-exec-run". During startup program exited with code 0xc0000139.
But, if I comment these code, I can debug my code.

Debugger Configurations

tasks.json:
'
{
	"version": "2.0.0",
	"tasks": [
		{
			"type": "shell",
            "label": "compile",
            "command": "g++",
            "args": [
                "-g",
                "${file}",
                "-o",
                "${fileDirname}\\${fileBasenameNoExtension}.exe"
            ],
            "problemMatcher": [
                "$gcc"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            }
		}
	]
}
'

launch.json:
'
{
    // 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": "C/C++",
            "type": "cppdbg",
            "request": "launch",
            "program": "${fileDirname}/${fileBasenameNoExtension}.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "miDebuggerPath": "gdb.exe",
            "preLaunchTask": "compile",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ],
        }


    ]
}
'

Debugger Logs

=thread-group-added,id="i1"
GNU gdb (GDB) 15.2
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-w64-mingw32".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Warning: Debuggee TargetArchitecture not detected, assuming x86_64.
=cmd-param-changed,param="pagination",value="off"
[New Thread 33576.0x9550]
[New Thread 33576.0x6e74]
[New Thread 33576.0xaf84]
[Thread 33576.0xaf84 exited with code 3221225785]
[Thread 33576.0xcb4 exited with code 3221225785]
[Thread 33576.0x9550 exited with code 3221225785]
ERROR: Unable to start debugging. Unexpected GDB output from command "-exec-run". During startup program exited with code 0xc0000139.
The program 'c:\zy_temp\c_test\output\test_code.exe' has exited with code 0 (0x00000000).

Other Extensions

No response

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants