Forum > Debugger

how to tell the debugger to redirect the debuggee's output to a file ?

(1/2) > >>

440bx:
Hello,

basically what I'm trying to do is to debug a console program that would be started on the command line with its output redirected, i.e:

TheProgram.exe > PutOutputHere

how do I tell the debugger to redirect the debuggee's output (stdout) to the file "PutOutputHere" ?

Thank you for your help.


sash:
Not related to debugging, but Menu -> Run -> Run Parameters -> Command line (without appname) "> out.txt" works for me.

440bx:

--- Quote from: sash on July 29, 2018, 12:51:26 am ---Not related to debugging, but Menu -> Run -> Run Parameters -> Command line (without appname) "> out.txt" works for me.

--- End quote ---

Thank you.  I tried that but, it didn't work for me.   My program sees the ">" and "out.txt" as command line parameters.  It was worth a try.

Are you using a flavor of unix or Windows ?

Martin_fr:
Not tested: (unix /Mac only)

Tools > Opiton > Debugger: Look through the property grid, there should be an option about "...Pty...". Try to put your filename there.

This option is global. Not per project

440bx:

--- Quote from: Martin_fr on July 29, 2018, 07:45:52 pm ---Not tested: (unix /Mac only)

Tools > Opiton > Debugger: Look through the property grid, there should be an option about "...Pty...". Try to put your filename there.

This option is global. Not per project

--- End quote ---

Thank you Martin.  Maybe I didn't set the right field but, I didn't get any of those I tried to work.  I just added a little bit of code that is conditionally compiled to do the redirection "manually".  Not exactly elegant but, it serves the purpose.  It will do and it's easily re-useable :)

Again, thank you.

Navigation

[0] Message Index

[#] Next page

Go to full version