Getting target program prompt in CLion debugger console

I'm debugging a program that offers its own CLI. Typically this is available when running in GDB, and Ctrl-C twice restores the gdb prompt, and "c" restores the program prompt as one would expect.

I don't seem to be able to do this in CLion. Hitting Return in either the GDB or Console windows when in the debugger doesn't give me the program's prompt. 

Any thoughts on a setting I need? 

0
3 comments

There's no such ability to switch between program input/output and the GDB console in CLion using Ctrl-C/cont commands, unfortunately. Instead, you have two consoles - one for the program itself and one for the GDB console.

You can open the console view and the GDB console view side by side in the Debug tool window and use them accordingly. That is, the former one is active while the program is running, and the latter activates when you suspend the execution. Does it work for you, or am I missing something?

0

Thanks Eldar, appreciate the response. I'm aware of the debugger and console view. If I run this app from the terminal in gdb, with the same args, gdb gives me the app's cmd CLI.

In Clion, in console or the debugger view I don't get the prompt. I was wondering if Clion's debugger was masking signals or some such.

0

Keith, you're very welcome.

CLion only separates GDB and application IO streams redirecting them to different consoles, thus both CLI prompts should work, otherwise there must be a bug in CLion. Could you tell us more on your setup, please? Which OS do you use? Is the source code of the app you're working in is available so that we could try reproducing it on our side?

0

Please sign in to leave a comment.