WIA Trace Viewer Tool

[This is preliminary
documentation and subject to change.]

SUMMARY

Wiatrcvw.exe is an application that allows
developers to view WIA trace output. This application supports filtering by
process ID, thread ID, and module name. It also supports changing WIA tracing
parameters for each module. By default, it opens the following trace file:
%WINDIR%\Debug\WIA\wiatrace.log.

Command
Line Parameters

The WIA Trace Viewer tool can be
launched in default mode (without command-line parameters), which opens
%WINDIR%\Debug\WIA\wiatrace.log, loads all entries from it, and then displays
it in the UI.

Usage:   wiatrcvw [-i inifile]
[-m maskfile] tracefile

wiatrcvw
-f [module.ext]

wiatrcvw
-t [filename.log]

-i inifile

Specify an alternate initialization file.  Default:
%userprofile%\Application Data\wiatrcvw.ini

-m maskfile

Specify an alternate mask file.  Default:

-f [module.ext]

Display the module trace flags for all modules, or the
optional module specified as an argument, and then exit the program.

-t [filename.log]

Truncate the supplied trace file.  If a file is not specified, truncate
%WINDIR%\Debug\WIA\wiatrace.log.

tracefile

Trace file to read during startup.  Default:
%WINDIR%\Debug\WIA\wiatrace.log

UI
Elements

The user interface is divided into
five sections:

·
Menu.

·
Toolbar.

·
Tree
view of process and thread IDs.

·
List
of modules.

·
Actual
trace view.

Menu:

File >
Open                                         Opens
another trace file for viewing.

File >
Save As…                                 Save
trace file under different name.

File >
Save Selection As..                  Save
highlighted portion of the trace to file.

File >
Close                                         Close
current trace file.

File >
Truncate “xxx.log”                    Truncate
all records from current trace file.

File >
Monitor File Changes                Put
WiaTrcVw.exe into a mode where it will continually refresh the display as trace
file changes. Default is to wait for an explicit refresh from the user (F5).

File >
Exit                                            Close
the application.

Edit >
Copy                                         Copy
highlighted rows from trace view (as text).

Edit >
Select All                                  Select
all rows of trace view.

Edit >
Find                                           Search
for given text through trace file.

Edit >
Find Next                                  Search
again.

Edit >
Go To Line…                            Skip
to absolute position in trace file.

Edit >
Find Previous Error                  Find
last error statement before current trace line.

Edit >
Find Next Error                         Find
next error statement after current trace line.

Edit >
Debug Process                         Launch
ntsd.exe attached to currently selected process.

Edit >
Edit File                                     Launch
default editor for the source file name that is contained in current trace file
entry.

Edit >
Properties                                 Show
detailed information on current trace file entry.

View >
Refresh                                   Reload
current trace file.

View >
Select Just This Thread          Display
only trace file entries generated by current thread.

View >
Select Just This Process        Display
only trace file entries generated by current process.

View >
Select Just This Module         Display
only trace file entries generated by current module.

View >
Select All Trace Criteria         Remove
all filters (display entire trace file).

View >
Set Current Module Flags      Open
dialog box that allows users to set/reset trace flags for currently selected
module.

View >
Set Module Flags                    Open
dialog box that allows users to set/reset trace flags for all registered
modules.

View >
Show Filter Pane                    Show/hide
filter pane (tree view of process and thread IDs and list of modules). Default:
Show.

View >
Options…                                Show
dialog for setting various options:

–
Appearance:
Setting font attributes.

–
Format:
Allows users to change the formatting of a trace string in trace view
(adding/removing fields, and so on.).

–
Editor:
Set default text editor for opening source files using Edit > Edit File.

–
Debugger:
Set default debugger for option using Edit > Debug Process.

–
Folders:
Set folder mappings (useful when source code is situated at a different
location than the original build machine).

–
Trace
Settings: Setting maximum trace file size, suppressing process output, defining
mask description file, and setting module trace settings.

Help >
Command Line Arguments…        Command-Line
arguments.

Help >
About…                                           About
dialog box.

Toolbar:

Toolbar icons duplicate frequently
used menu options (described from left to right):

–
File
> Open

–
Edit
> Copy

–
Edit
> Find…

–
Edit
> Properties…

–
View
> Set Module Flags

Process and Thread IDs:

The previous pane displays the
processes and threads within a trace file. Each process and thread includes a
check box which can be used to filter out or include trace output when going
into trace view. In this example, logged trace information from process 2948
and from thread 2132 in process 3784 will not be displayed.

Modules:

The previous pane displays all
registered modules that are present in current trace file. As for
processes/threads, each module can be turned on and turned off (which is very
helpful in terms of filtering unwanted content from trace file).

Trace Text:

The previous pane displays formatted
and indented trace file content. Each thread’s trace is displayed in different
colors. The icons represent the severity of the message:

Function
Entry

Function Exit

Trace statement

Warning statement

Error statement

Module
Trace Settings Dialog

The Module Trace Setting dialog displays four tabs.

General

Displays the module name, and allows
users to set a maximum trace array size and trace level for each module.

Flags

This is most important tab. It allows
setting and resetting trace flags for given module. Flags are:

–
Severity:

o  Error

o  Warning

o  Object Tracking Output

o  Trace

o  Function Entry/Exit

–
Action:

o  DebugBreak on Error

o  Wrap File

o  Append Trace File

o  No Trace Array

o  Only Trace Array

o  Indent Debugger String

–
Detail (in debugger only):

o  Filename and Line Number

o  Timestamp

o  Process and Thread ID

o  Module Name

o  Project Identifier

o  Severity Identifier

o  Trace Mask

o  Indenting

Trace Masks

Sets custom trace masks for each
module.

Debug Heap

Controls debug heap parameters. It is recommended that you use the default
parameter values.

© 2004
Microsoft Corporation