Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: D2007 Debugging & Event Log Window eatings


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 5 - Last Post: Jan 11, 2017 7:15 AM Last Post By: Hanspeter Widmer
Hanspeter Widmer

Posts: 19
Registered: 10/14/00
D2007 Debugging & Event Log Window eatings  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 9, 2016 12:10 AM
While using D2007 & Win 7/64.

Is there a simple way while debugging that the D2007 do not eats any outputdebugstring messages in case having in the
Tools\Options\Debugger Options\Output Messages switched off and let any other Debug-Viewer to show?

The point is that the Delphi "Event Log" is dam slow and interrupts fast processing...
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: D2007 Debugging & Event Log Window eatings  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 9, 2016 11:32 AM   in response to: Hanspeter Widmer in response to: Hanspeter Widmer
Hanspeter wrote:

Is there a simple way while debugging that the D2007 do not
eats any outputdebugstring messages in case having in the
Tools\Options\Debugger Options\Output Messages switched
off and let any other Debug-Viewer to show?

No. The current active debugger receives all debug output messages. You
can see the messages in an external viewer only when NOT debugging.

--
Remy Lebeau (TeamB)
NATHAN WILD

Posts: 4
Registered: 2/13/15
Re: D2007 Debugging & Event Log Window eatings  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 9, 2016 1:59 PM   in response to: Hanspeter Widmer in response to: Hanspeter Widmer
Hanspeter Widmer wrote:

While using D2007 & Win 7/64.

Is there a simple way while debugging that the D2007 do not eats any
outputdebugstring messages in case having in the
Tools\Options\Debugger Options\Output Messages switched off and let
any other Debug-Viewer to show?

The point is that the Delphi "Event Log" is dam slow and interrupts
fast processing...

Not sure if it is available for D2007, but you may also wish to use
something like CodeSite? It is bundled with newer RadStudio releases
and has been a staple for live testing and debugging on my end for a
while now.
Alex Belo

Posts: 626
Registered: 10/8/06
Re: D2007 Debugging & Event Log Window eatings  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 9, 2016 9:20 PM   in response to: Hanspeter Widmer in response to: Hanspeter Widmer
Hanspeter Widmer wrote:

The point is that the Delphi "Event Log" is dam slow and interrupts
fast processing...

In what situation do you analize debug strings log?

If you receive messages from "external source" (like 3-d party dll) it
seems there is no solution.

But in your own code you can use some simple analog of debug messages:
put messages into linked list of strings (in thread safe manner) and
read/save them in low priority thread.

--
Alex
Alex Belo

Posts: 626
Registered: 10/8/06
Re: D2007 Debugging & Event Log Window eatings  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 10, 2016 8:17 PM   in response to: Alex Belo in response to: Alex Belo
Alex Belo wrote:

If you receive messages from "external source" (like 3-d party dll) it
seems there is no solution.

Idea: hook OutputDebugString in your process (I don't know for sure if
this possible but why not?) to block passing strings to slow dbg
infrastructure.

--
Alex
Hanspeter Widmer

Posts: 19
Registered: 10/14/00
Re: D2007 Debugging & Event Log Window eatings  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 11, 2017 7:15 AM   in response to: Alex Belo in response to: Alex Belo
Alex Belo wrote:
Alex Belo wrote:

If you receive messages from "external source" (like 3-d party dll) it
seems there is no solution.

Idea: hook OutputDebugString in your process (I don't know for sure if
this possible but why not?) to block passing strings to slow dbg
infrastructure.

--
Alex

Well, to hook the Delphi OutputDebugString Message for the Message Window, would be the best solution :D

I did some test using a 8 core 3.1 GHz CPU feeding 1000-times a string messages at once (with 100 chars) and measured for those strings:

1- Delphi2007 : 630ms

2- DebugView : 30ms (without Delphi)

3- DebugView : 25ms sending to the DebugViewer directly (without OS API) :D

4- Lock free posting would go as low as 5ms

While there are mainly 2 issues:

1- the sender who gets blocked on multiple messages as on threads

2-The receiver as on Delphi2007 waits until the message has been added to the MS control

Cheers

Hp

Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02