Bypassing OutputDebugString in Delphi 7?

I am wondering if it is possible to get around OutputDebugString? I would like the output of OutputDebugString to be displayed in DebugView, and not in the internal Delphi event viewer. But I can't find a way to tell Delphi not to swallow OutputDebugString. Any ideas?

considers

+4
source share
5 answers

It's impossible.

OutputDebugString sends the string to the debugger (as the name suggests). There can only be one active debugger per process. You run your application in Delphi - Delphi received messages as its debugger. You run an application outside of Delphi - DebugView can access them because the debugger did not require it.

However: WHY do you need it? Just disable other types of events in the Delphi event log - and you will get the same functionality as DebugView.

+3
source

I think there is no way around this. In Delphi 2009, the situation is the same. You must send a feature request: http://qc.embarcadero.com

I am wondering what advantage should there be in place of the Delphi event log internal window?

+1
source

Instead of DebugView, you can try using Process Monitor and its new debugging feature. It does not use OutputDebugString, it uses its own API , as well as the Delphi shell here . You can use the Process Monitor filtering functions, and Delphi will not capture these messages, but these are not common functions like the OutputDebugString functions.

+1
source

Disabling "output messages" in event log properties does not work?

0
source

Not that I asked the original question, I understand, but it's worth taking a look at Raize Software's CodeSite. It takes OutputDebugString to a whole new level. Messages (can) be sent to the CodeSite viewer, which is roughly equivalent to the high-level DebugView. Well worth every penny IMHO.

0
source

Source: https://habr.com/ru/post/1313834/


All Articles