Debugging Tools for Windows

ADPlus Command-Line Options

ADPlus uses the following syntax.

adplus.vbs [-quiet] [-c ConfigurationFile] { -hang | -crash } 
   { -iis | -pn Process | -p PID | -sc SpawningCommandLine } 
   [-notify Name] [-o Directory] [-cdh] [-cdc
   [-cdj] [-gs ScriptName] [ -ce CustomExceptionCode
   [-bp BreakpointParameters] [-y SymbolPath
   [-yp SymbolPathToAdd] [-FullOnFirst] [-MiniOnSecond
   [-NoDumpOnFirst] [-NoDumpOnSecond] [-NoTlist
   [-NoTsCheck] [-dbg Debugger] [-r Repeats IntervalInSeconds]
   [-lcq] [-lcg] [-lcgn] [-lcv]

adplus.vbs -Help 

The command is parsed from left to right. When you specify a target, ADPlus uses all of the options that it has parsed up to that point. This kind of parsing enables you to create a long command that has multiple targets and to specify different options for each target. To specify options easily, you can store them in configuration files and use the -c parameter to point to these files.

Parameters

-quiet
Suppresses all modal dialog boxes. This option is useful if you are running ADPlus in a remote command shell where modal dialog boxes can cause ADPlus to wait indefinitely for a user to press OK.

For best results, make sure that this option is the first option that is passed to Adplus.vbs.

-c ConfigurationFile
Enables you to provide an external configuration file that has additional information. You can use more than one configuration file by using several -c switches, as follows.

adplus -c c:\t\file1.cfg  -c c:\t\file2.cfg

You can omit a required switch at the command prompt if you specify the equivalent setting in the configuration file. For more information about these files, see ADPlus Configuration Files.

-hang
Configures ADPlus to run in hang mode. When ADPlus is running in hang mode, you must start ADPlus after a process stops responding (that is, hangs) or is consuming high CPU utilization.
-crash
Configures ADPlus to run in crash mode. When ADPlus is running in crash mode, you must start ADPlus before the process fails (that is, crashes) or becomes unstable.
-iis
Debugs Internet Information Server (IIS) 4.0 or later. When you use ADPlus with the -iis option, ADPlus monitors all of the IIS in-process (Inetinfo.exe) and out-of-process (Mtx.exe and Dllhost.exe) applications. You can use this option in addition to the -pn or -p options, or you can use -iis by itself to analyze IIS and all running MTS or COM+ applications in crash mode or hang mode.

If you are trying to analyze IIS 3.0 (or earlier), you should use the -pn option and specify Inetinfo.exe as the process to monitor.

-pn Process
Specifies a process name that ADPlus should analyze. Process should include the file name extension. To specify more than one process, use multiple -pn options (for example, -pn process1.exe -pn process2.exe).
-p PID
Specifies the process ID (PID) of a process that ADPlus should analyze. To specify more than one process, use multiple -p options (for example, -p 1896 -p 1702).
-sc SpawningCommandLine
Enables you to provide a command. The debugger creates the process inside the debugger and starts monitoring it. This option is available only in crash mode, and you must add the -sc switch as the last option, because everything that is provided after this option is considered to be the command to use to create the selected process. If you want to create more than one process, use the -c switch and a configuration file.
-notify Name
(Crash mode only) Sends a message if a failure occurs. Name is the computer or user who receives the message. Whenever the debugger detaches from the process because of a second-chance exception, or whenever you press CTRL+C to stop debugging, a notification is sent to this computer or remote user or computer through the local messenger service. The local messenger service must be running on the target computer for this message to work.
-o Directory
Tells ADPlus where to put the debug output files. You should put long file names and file names that contain spaces in double quotation marks. If you use a UNC path (\\server\share), ADPlus creates a new folder immediately below the UNC path that is specified with the name of the server that ADPlus is running on (for example, \\server\share\Web1 or \\server\share\Web2). This option is useful if ADPlus is running on multiple computers in a Web farm that are all putting their output on the same network share.
-cdh
Signals ADPlus to use the default configuration file for hang mode. You should name the default configuration file ADP_Default_Hang.cfg and you must store it in the same directory as Adplus.vbs.
-cdc
Signals ADPlus to use the default configuration file for crash mode. You should name the default configuration file ADP_Default_Crash.cfg and you must store it in the same directory as Adplus.vbs.
-cdj
Signals ADPlus to use the default configuration file for postmortem debugging mode. You should name the default configuration file ADP_Default_JIT.cfg and you must store it in the same directory as Adplus.vbs. This file is typically used if you decide to use ADPlus as the default postmortem debugger. The configuration for this mode should be similar to hang mode.
-gs ScriptName
Creates a script named ScriptName to use together with the debugger ADPlus save the script to a file. When you use this switch, you do not have to select any process to debug.
-ce CustomExceptionCode
Enables you to add custom exceptions for the debugger to monitor.
-bp BreakpointParameters
Enables you to define breakpoints for the debugger to monitor. BreakpointParameters has the syntax of address;parameters. You must separate the additional parameters by semicolons and the parameters cannot contain spaces. You can use any of the following parameters:
MiniDump, FullDump or NoDump
Indicates whether you want a dump. By default, there is no dump.
Integer
Indicates the number of passes to ignore.
Q or QD or G
Indicates whether you want to quit, quit and detach, or go after the action. The default value is G.
BP or BU or BM
Indicates the type of debugger command that was used to create the breakpoint. The default value is BP. If you use BM, you can define multiple breakpoints by using wildcard characters in the address.

If you do not include any optional parameters, the default behavior is to create a log, list the call stack, and then let the target run.

-y SymbolPath
Enables you to define the symbol path. This option accepts multiple folders separated by semicolons, including references to symbol servers.
-yp SymbolPathToAdd
Enables you to add a symbol path of the path that is already defined in the debugger . This option accepts multiple folders separated by semicolons, including references to symbol servers.
-FullOnFirst
Creates full dumps on first chance for all defined exceptions. The default behavior is to have minidumps created on first chance. If several first-chance exceptions of the same type occur, the dump files are overwritten. If you want another type of behavior, you can use the configuration file for additional options.
-MiniOnSecond
Creates minidumps on second chance for all defined exceptions. The default behavior is to have full dumps created on second chance.
-NoDumpOnFirst
Creates no dumps on first chance for all defined exceptions. The default behavior is to have minidumps created on first chance.
-NoDumpOnSecond
Creates no dumps on second chance for all defined exceptions. The default behavior is to have full dumps created on second chance.
-NoTlist
Does not use the TList tool to obtain the list of running processes. You should use this option only if you are experiencing problems with ADPlus that are related to the TList tool.

If you use -NoTlist, you cannot use the -pn switch. In addition, the dump file names do not include the package name for COM+ applications.

-NoTsCheck
Enables ADPlus to attach to a target in a Terminal Server session, if you started the target in the same session as ADPlus. You have to use this switch only in Microsoft Windows 2000. If this switch is not included in those operating systems, you cannot use ADPlus in a Terminal Server session. In Windows XP and later versions of Windows, ADPlus can freely attach to targets in Terminal Server, regardless of what session they were started on, and you do not have to use this switch.
-dbg Debugger
Enables you to select the debugger to use. The default debugger is CDB, but you can select WinDbg or NTSD instead. Debugger should include the debugger name and the .exe extension.
-r Repeats IntervalInSeconds
Enables you to do repeated hang attachments. This option is ignored in crash mode. Repeats specifies the number of times that you want ADPlus to run in hang mode. IntervalInSeconds specifies the interval, in seconds, between each run.
-lcq
Sets the last script command to Q (quit).
-lcg
Sets the last script command to G (go).
-lcgn
Sets the last script command to GN (go not handled).
-lcv
Sets the last script command to void (no command; waits for user input).
-Help
Displays help information for ADPlus.

Additional Information

For more information about ADPlus, see ADPlus.

Build machine: CAPEBUILD