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

Debug doesn't set MIDebuggerPath #242

Closed
jovere opened this issue Oct 26, 2017 · 2 comments
Closed

Debug doesn't set MIDebuggerPath #242

jovere opened this issue Oct 26, 2017 · 2 comments
Assignees
Labels
bug a bug in the product
Milestone

Comments

@jovere
Copy link

jovere commented Oct 26, 2017

The CMake Tools plugin works for the most part after selecting the environment (the "Working in..." part in bottom right). It correctly builds everything when I select MinGW. However, if I try to select Debug, using the default CMake Tools debugging options, I get the following message:
Unable to start debugging. Launch options string provided by the project system is invalid. Unable to determine path to debugger. Please specify the "MIDebuggerPath" option.
If the MIDebuggerPath was set to the environment (ie. the activeEnvironments in .cmaketools.json plus the expected debugger, (ie. bin/gdb), manual creation of the launch.json would not be required.

For example, my present MinGW environment is as follows in .cmaketools.json:

  "activeEnvironments": [
    "MinGW - C:/Program Files (x86)/mingw-w64/i686-7.2.0-posix-dwarf-rt_v5-rev0/mingw32"
  ],

It would be nice if the CMake Tools was smart enough to set MIDebuggerPath to:

C:/Program Files (x86)/mingw-w64/i686-7.2.0-posix-dwarf-rt_v5-rev0/mingw32/bin/gdb
@vector-of-bool vector-of-bool added the bug a bug in the product label Nov 10, 2017
@vector-of-bool vector-of-bool added this to the Backlog milestone Nov 10, 2017
@FelikZ
Copy link

FelikZ commented Mar 11, 2018

Try this:

{
    // 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": "Launch CMake-built program",
            "type": "cppdbg",
            "request": "launch",
            "program": "${command:cmake.debugTarget}",
            "stopAtEntry": true,
            "cwd": "${workspaceRoot}"
        }
    ]
}

@KoeMai
Copy link
Contributor

KoeMai commented Jun 5, 2018

This should work in the next version. the gdb path is generated out of the c compiler/ cxx compiler from cmake cache.

If it does not work like expected then reopen it.

@KoeMai KoeMai closed this as completed Jun 5, 2018
@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug a bug in the product
Projects
None yet
Development

No branches or pull requests

4 participants