views:

47

answers:

2

Is there some way in Visual Studio to enable/disable automatic tracing of events? I am not referring to adding Debug. or Trace. statements but rather having the system write to a buffer all the events that it has detected that apply to the application. This feature is common in embedded systems development and I can find no way to enable it in VS.

Update ==================================================================

What I have seen in other tools is that you would:

Enable/Disable Event Trace

Have a menu that would allow you to select which events or class of events that you desire to trace. For example, All Mouse Events or just Enter, Leave, Click, etc. Normally only events that affect the application under test are tracked (not system-wide)

Its one hell of lot easier than adding Trace. and Debug. statements to your code. Not to mention that Trace.'s and Debug.'s can put substantial load on a system and affect operations if you use a lot of them

Typically the traces are very lightweight, like a simple EventID stored in a buffer that can interpreted by another tool. This is done to prevent tracing from interfering with operation.

I'm just asking.

A: 

It can't be done with VS so far, I think.

Benny
A: 

VS cannot do that indeed. Your best bet for this kind of events is Spy++ (eternal tool in VS suite), which has a lot of filter options and it's log can be saved to a file.

stijn