How to launch external application and auto attach debugger

已回答

I'm developing a plugin for an external application. I can launch that application and use "Attach to Process…" to debug my plugin inside that application. That does work, but is somewhat uncomfortable. And if my plugin has trouble during initialization phase, I have to be really fast to do the Launch App > Go to CLion > Attach to Process cycle. And it also takes the debugger a while to attach itself to the external Application.

What I'm looking for is a way to start the external application from inside CLion and immediately attach the debugger to it.

 

 

0

Hello!

It's not implemented for now, unfortunately. https://youtrack.jetbrains.com/issue/CPP-9811 should help in the described scenario. Feel free to comment or upvote the mentioned issue or to create a new feature request.

0

Hi Anna Falevskaya,
Thanks for replying on this issue. Is there a public API to attach debugger to process ?

0

Hi Alexander Czernay, does creating a custom Run/Debug configuration helps you in this case?

I have a similar problem: I have to launch a python application and attach gdb on it to debug a C++ library. What I did to solve this was
> Create a new CMake Run/Debug Configuration
> Set the respective target
> Select the python interpreter executable on Executable field
> Put the script path and the rest of arguments to launch the application

Then I can just select the Run configuration and click on the debugger button, that the gdb debugger will be automatically attached to python

0

Gidi Gal at this moment CLion doesn't provide a stable public API if that's what you're asking.

0

请先登录再写评论。