cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get GDB debug output to a file?

SMoor.6
Associate

I'm debugging a problem on the target. The data I want to examine is in an array and can be easily seen in the Debugger console using "print output_data". I'd like this in a file to facilitate further host processing. When using gdb standalone I can do this with "set logging file my_log.txt" but this doesn't appear to work with GDB within STM32CubeIDE. I'm having to resort to copy and paste which works but is a bit tedious.

1 ACCEPTED SOLUTION

Accepted Solutions
KnarfB
Principal III

add a command

set logging on

to make logging to the file active.

hth

KnarfB

View solution in original post

2 REPLIES 2
KnarfB
Principal III

add a command

set logging on

to make logging to the file active.

hth

KnarfB

SMoor.6
Associate

Thank you. That works. I'd assumed that setting the log file name turned logging on.

Just to be clear for anyone else...

set logging file my_log.txt

set logging on

.

.

set logging off