Adding Custom Messages to the Event View Panel

Applies to AQTime 8.81, last modified on March 03, 2021

When you are profiling your application with AQTime, the Event View panel displays events that occur in the profiled application and in the operating system during profiling. The panel shows the event log at runtime and after the application terminates. You can find a list of traced events in the Event View Panel topic.

You can add custom messages to the event log manually and programmatically. It is easy to do this.

Adding Messages Manually

To add a message to the Event View panel manually:

  • Switch to the Event View panel.
  • Right-click somewhere within the panel and select Add Comment from the panel’s context menu.
  • Specify your message in the subsequent Add Comment dialog.

    -- or --

  • Copy the message text to the clipboard.
  • Switch to the Event View panel.
  • Right-click somewhere within the panel and select Paste as Comment from the panel’s context menu.

The new messages will be logged as comments at the end of the event log or after the currently selected message.

To modify the added comment, double-click it in the Event View panel and then change the comment in the subsequent Edit Comment dialog.

Adding Messages Automatically

To add a message to the Event View panel programmatically, call the OutputDebugString function within your code. OutputDebugString is a Windows API function that sends a string to the debugger. Since AQTime acts as a debugger for your application, it receives the string and displays it in the Event View panel as the Debug String event.

Normally, the number of various events that occur during the profiler run is large. Using the OutputDebugString function, you can easily insert “markers” into the event log to indicate that a certain operation has been started (or finished) or to signal some changes in the application. All you have to do to insert a marker is to call the OutputDebugString function in your code.

AQTime can determine the sequence of function calls that led to the OutputDebugString function call and displays this sequence in the Event View panel. To enable call stack tracing, select the Debug String option from the Debug Events > Show call stack settings group in the Event View - General dialog (to invoke this dialog, right-click somewhere within the Event View panel and select Options from the context menu).

The call stack is shown as child nodes of the Debug String node. These child nodes hold the addresses and names of routines that are in the call stack. For more information on possible problems with call stacks, see Possible Problems with the Call Stack.

See Also

Event View Panel
Event View Options
Exceptions in the Event View Panel
Possible Problems with the Call Stack

Highlight search results