15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Debug - Dump

Cesar Lozano Fernandez -- lozano@iit.upco.es
Thursday, September 05, 1996

Environment: VC++ 2.0 and Windows NT 3.51

Hi all,

I would like to know how to send the Dump output to another device 
different from the output window of the VC++. I mean, if I debug the 
application all the outputs (Dump, ..., etc.) are sent to that window 
but if i compile the application in Debug mode and then execute it those 
outputs are sent to stderr. Is there any method to redirect this 
information while one is executing the application, for example 
modifying the afxDump contents.

TIA

Cesar Lozano
lozano@iit.upco.es

P.S.: Yesterday a friend of me gave me a program called DBWIN32 that 
works fine for Windows NT 3.51 but not in Windows 95. In any case, 
i would like to know how to redirect the debug output in the code, not 
using another program.



Dan Kirby -- dkirby@accessone.com
Thursday, September 05, 1996

[Mini-digest: 2 responses]

With VC++ 4.x you can dump TRACE messages and dumps to a file by doing:

DumpFile.Open("d:\\test.dmp", CFile::modeCreate|CFile::modeReadWrite);
afxDump.m_pFile= &DumpFile;

This will redirect the output to the test.dmp file.

--dan

----------
> From: Cesar Lozano 
> To: mfc-l@netcom.com
> Subject: Debug - Dump
> Date: Wednesday, September 04, 1996 11:18 PM
> 
> Environment: VC++ 2.0 and Windows NT 3.51
> 
> Hi all,
> 
> I would like to know how to send the Dump output to another device 
> different from the output window of the VC++. I mean, if I debug the 
> application all the outputs (Dump, ..., etc.) are sent to that window 
> but if i compile the application in Debug mode and then execute it those 
> outputs are sent to stderr. Is there any method to redirect this 
> information while one is executing the application, for example 
> modifying the afxDump contents.
> 
> TIA
> 
> Cesar Lozano
> lozano@iit.upco.es
> 
> P.S.: Yesterday a friend of me gave me a program called DBWIN32 that 
> works fine for Windows NT 3.51 but not in Windows 95. In any case, 
> i would like to know how to redirect the debug output in the code, not 
> using another program.
-----From: Mario Contestabile

>but if i compile the application in Debug mode and then execute it those 
>outputs are sent to stderr. Is there any method to redirect this 
>information while one is executing the application

Might want to try:
freopen("OUTPUT.TXT", "w", stderr);

mcontest@universal.com




leffen -- leffen@subnett.no
Sunday, September 08, 1996

	Check out Paul DiLascia C/C++ Q/A MSJ March 1996. He have wrote a =
application named Tracewin that do redirect debug output to a window. =
Can be used to log the debug to a file. Search on Tracewin on developers =
network >=3D april 1996. There are more than on revison of this class so =
be shure to use the latest. It works on NT and win95.


Leffen
>----------
>Fra: Cesar Lozano[SMTP:lozano@iit.upco.es]
>Sendt: torsdag, september 05, 1996 08:18
>Ti&l: mfc-l@netcom.com
>E&mne: Debug - Dump
>
>Environment: VC++ 2.0 and Windows NT 3.51
>
>Hi all,
>
>I would like to know how to send the Dump output to another device=20
>different from the output window of the VC++. I mean, if I debug the=20
>application all the outputs (Dump, ..., etc.) are sent to that window=20
>but if i compile the application in Debug mode and then execute it =
those=20
>outputs are sent to stderr. Is there any method to redirect this=20
i>nformation while one is executing the application, for example=20
>modifying the afxDump contents.

>TIA

>Cesar Lozano
>lozano@iit.upco.es
>
>P.S.: Yesterday a friend of me gave me a program called DBWIN32 that=20
>works fine for Windows NT 3.51 but not in Windows 95. In any case,=20
>i would like to know how to redirect the debug output in the code, not=20
>using another program.






| Вернуться в корень Архива |