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

clion plugin - unable to specify GDB #46

Closed
asa opened this issue Jan 24, 2017 · 5 comments
Closed

clion plugin - unable to specify GDB #46

asa opened this issue Jan 24, 2017 · 5 comments

Comments

@asa
Copy link

asa commented Jan 24, 2017

I am unable to setup a debugger with the clion plugin. I get an error in the console: Error running Bazel run my_project:example: GDB executable not specified

I have tried to use --run_under, as well as setup gdb remote debugger, with no luck.
Perhaps I just need better docs?

@brendandouglas
Copy link
Contributor

Hi @asa, you can specify the GDB binary in Settings > Build, Execution, Deployment > Toolchains.

@brendandouglas
Copy link
Contributor

I'll close this -- please reopen if that didn't fix it.

@asa
Copy link
Author

asa commented Jan 26, 2017 via email

@brendandouglas
Copy link
Contributor

We currently only support linux. We have support for OSX and Windows planned at some stage, but it's not a current priority. Some things may work on OSX (and do indeed seem to, based on some of the comments here), but it's completely untested.

As a separate issue, CLwB currently only supports gdb (see BlazeCidrLauncher for the relevant code). Still, if you have gdb installed on your system, and specify the binary path in the settings, I'd expect this to work.

@david-german-tri
Copy link

david-german-tri commented Feb 21, 2017

@asa, you may be interested in bazelbuild/bazel#2537. With the workarounds I've described on that thread, I've been able to generate dSYM files in bazel-bin. Separately, I was able to specify "Bundled GDB 7.11.1" in the CLion 2016.2.2 settings. I could then debug Bazel-built binaries using GDB, in CLion, on OS X.

One additional caveat: if your breakpoints don't take effect, check the console. GDB may be complaining that it can't find your source files, which can be worked around by adding set directories /path/to/my/workspace/root to your .gdbinit. This is not a CLion-specific problem, although CLion triggers it by passing absolute paths to GDB. Those paths appear invalid to GDB on OS X, for reasons I haven't fully worked out. It probably has something to do with the paths that the Bazel build embeds in DWARF symbols.

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

No branches or pull requests

3 participants