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

Unable to start debugging (no connection to GDB) #86278

Closed
fire-type opened this issue Dec 4, 2019 · 1 comment
Closed

Unable to start debugging (no connection to GDB) #86278

fire-type opened this issue Dec 4, 2019 · 1 comment
Labels
*caused-by-extension Issue identified to be caused by an extension

Comments

@fire-type
Copy link

I have a very simple C c
LRESULT.docx
ode which i am trying to compile/debug. At this point it is just a 'Hello World!' program because I am new to Visual Studio Code and am just trying to get the compiler to work. In hopes of it helping, here is my code:

#include <stdio.h>
int main() {
// printf() displays the string inside quotation
int a = 666;

printf("Hello, World!");
return 0;
}

I also have a launch.json as follows:

"version": "0.2.0",
"configurations": [
    {
        "name": "gdb.exe build and debug active file",
        "type": "cppdbg",
        "request": "launch",
        "program": "C:\\_work\\VSCode Projects\\Blank\\test.exe",
        "args": [],
        "stopAtEntry": false,
        "cwd": "C:\\_work\\VSCode Projects\\Blank",
        "environment": [],
        "externalConsole": false,
        "MIMode": "gdb",
        "miDebuggerPath": "C:\\MinGW-64\\bin\\gdb.exe",
        "setupCommands": [
            {
                "description": "Enable pretty-printing for gdb",
                "text": "-enable-pretty-printing",
                "ignoreFailures": true
            }
        ],
        "preLaunchTask": "gcc.exe build active file"
    }
]

}

and a Tasks.json:

{
"tasks": [
{
"type": "shell",
"label": "gcc.exe build active file",
"command": "C:\MinGW-64\bin\gcc.exe",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "C:\MinGW-64\bin"
},
"group": {
"kind": "build",
"isDefault": true
}
}
],
"version": "2.0.0"
}

I should be able to compile and debug this without any Problem. I've done Research on how to set up a project. When I attempt to compile/debug, i get the attached error message. I have my MinGW-64 installed directly on my C:/ drive. I have the C/C++ Extension downloaded and installed. I've tried other configurations with different .json files but none worked. It's worth mentioning that I am at a Business with restrictions as to what i can and cannot do with my administrative rights. example, when downloading MinGW-64 via Internet, I received an error from the install file stating it could not download the "repository.exe" file - which cancelled the installation. I later received MinGW via Company Network - and it installed fine. Now there are other issues. Are they company restriction - based? Is it my fault?

Ive attached the two error windows that Pop up as well as the terminal (there is no information in Output)

Please help me.

Err1
Err2
Terminal

@weinand weinand added the *caused-by-extension Issue identified to be caused by an extension label Dec 4, 2019
@vscodebot
Copy link

vscodebot bot commented Dec 4, 2019

This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in VS Code or the marketplace for VS Code. See also our issue reporting guidelines.

Happy Coding!

@vscodebot vscodebot bot closed this as completed Dec 4, 2019
@weinand weinand removed their assignment Dec 4, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*caused-by-extension Issue identified to be caused by an extension
Projects
None yet
Development

No branches or pull requests

2 participants