Immediate window & redirect

发布时间 2023-07-04 14:30:21作者: fndefbwefsowpvqfx

Redirect to text file

  1. Set the option Redirect all Output Window text to the Immediate Window.
    We find it in Tools → Options → Debugging → General (fifth to last item).

  2. Open the Immediate Window: Ctrl + Alt + I or Debug → Windows → Immediate Window

Enter a command like the following in the Immediate window:

> Tools.LogCommandWindowOutput /on C:\mylogfile.txt

To stop writing to the file, enter the following command in the Immediate window:

> Tools.LogCommandWindowOutput /off

> is needed, you should type it.

https://stackoverflow.com/questions/2586933/how-do-i-redirect-output-from-the-visual-studio-debugger

basic debug command

print the value of var

? var