Capture IDE Debugger Console Output to Local File

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Capture IDE Debugger Console Output to Local File

Jump to solution
1,021 Views
Dave_the_coder
Contributor II

Is there a built-in IDE method to export or re-direct the S32 Design Studion Debugger Console content to a local file?

I'm using the IDE debugger console to display large data arrays that are being used to capture realtime diagnostic information for seperate analysis, (using debugger commands like print -array on -array-indexes on -elements unlimited -pretty off -- waitrec_m)  but I have to manually select/copy the resulting console text in order to save it elsewhere.

I'm hoping to be able to better automate this process.

Labels (1)
0 Kudos
Reply
1 Solution
1,003 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @Dave_the_coder,

If you are using Semihosting to print into the console, you can use fprint instead to write directly into a file. Please look at the following community posts:

Best regards,
Julián

View solution in original post

7 Replies
1,004 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @Dave_the_coder,

If you are using Semihosting to print into the console, you can use fprint instead to write directly into a file. Please look at the following community posts:

Best regards,
Julián

991 Views
Dave_the_coder
Contributor II
Julián - Thank you for taking the time to respond, it is greatly appreciated!

Unfortunately, I cannot embed any Semihosting functions into the code I am testing as it has time-critical behaviour that breaks with the addition of fprintf() or similar library calls. I only have enough throughput capacity to write diagnostic data directly into ram-based arrays - after hitting a breakpoint I then have to display the captured data to the debug console and it is from that I am trying to capture the resulting console output.
I have looked through the available debug console commands but have not yet identified (or understood) anything that allows the console output to be redirected.

Regardless, thank you again for your suggestions.
Dave
0 Kudos
Reply
968 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @Dave_the_coder,

I'm not sure if this is the option you are looking for, but you can also select an output file from "Debug Configurations > Standard Input and Output"

Julin_AragnM_0-1722966980712.png

Best regards,
Julián 

 

0 Kudos
Reply
952 Views
Dave_the_coder
Contributor II
Thank you for your suggestion Julián
- unfortunately, I believe that this still relies on the use of the stdio library functions that as per my prevous explanation I can't use in my design.
I was hoping to find debugger console command options that would re-direct the console command output to a local file.
For example, the debugger console command 'print' supports a variety of command line options to format and display program variables and memory to the console, but I cannot identify any setting to redirect that command output to a local file.

Regards,
Dave
0 Kudos
Reply
950 Views
Dave_the_coder
Contributor II

To clarify:

I have been referring to the output obtained from the IDE Debugger Console :

Dave_the_coder_0-1723018721083.png 

- not the Standard input/Output console: 

Dave_the_coder_1-1723018821091.png

 

Dave

 

0 Kudos
Reply
933 Views
Dave_the_coder
Contributor II
I finally located the answer - the IDE debug console has commands 'dump' and 'set logging' options to redirect the output to a local file.

The answer was in one of the links 1st provided by Julián (Redirect debug console to file - NXP Community) - I completely missed the references in that link!

Julián - Apologies and Thanks!

Dave
916 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

No problem, Dave! I'm Glad you were able to find the solution.

Best regards,
Julián