Please enable JavaScript to view this site.

Bug Validator Help

Navigation: Command Line Interface

Target Program & Start Modes

Scroll Prev Top Next More

 

Resetting global settings

 

-resetSettings

 

Forces Bug Validator to reset all settings to the default state, except for any configured colours and the UI Global Hook settings which must be reset manually.

 

note If using this option, it's recommended that you list this first on your command line or in your command file.

 

 

Specifying the target application

 

The following options let you launch a program (with various start-up modes), inject into a running program or wait for a program to start before attaching.

 

 

Launching a program

 

-program

 

Specifies the full file system path of the executable target program to be started by Bug Validator, including any extension.

 

Not compatible with -injectName, -injectID, -waitName or -monitorAService.

 

See -arg below to pass arguments to your program, and -directory to set where it runs.

 

Examples:

 

-program c:\testbed.exe

-program "c:\new compiler\version2\testbed.exe"

 

If you specify the file without a path then:

 

If you used -directory to set a startup directory then the filename in that directory is used if it exists

 

Otherwise, the directories in the PATH environment variable are used to look for the filename

 

 

-programToMonitorEXE

   -programToMonitor

 

-programToMonitor has been replaced by -programToMonitorEXE. -programToMonitor will be honoured to provided backward compatibility.

 

Specifies the full path of the program from which the data is collected, but does not change which process is initially launched. Include the extension.

 

This program will be monitored by Bug Validator only when the program specified using -program starts it.

 

If no path is specified, the first child process that has the same name will be monitored.

 

To monitor any program that is launched specify <<Any>> as the program argument. In batch files and powershell scripts you will need to quote this to get it accepted by the file parser.

 

See -programToMonitorLaunchCount to change which instance of the program is monitored.

 

Only valid in conjunction with -program.

 

Examples:

 

-programToMonitorEXE c:\testbed-child-process.exe

-programToMonitorEXE "c:\new compiler\version2\testbedChildProcess.exe"

-programToMonitorEXE testbed-child-process.exe

-programToMonitorEXE "<<Any>>"

 

-program c:\testbed.exe -programToMonitorEXE c:\testbed-child-process.exe

 

In this last example c:\testbed.exe is launched but not monitored. Only when testbed.exe launches a child process c:\testbed-child-process.exe is that child process monitored.

 

 

-programToMonitorDLL

 

This option provides a qualifying DLL to identify different .Net Core processes, which are typically launched using the same .Net Core runtime. Include the dll extension.

 

Only valid in conjunction with -program and -programToMonitorEXE.

 

Examples:

 

-programToMonitorDLL c:\test\dotNetCoreApp.dll

 

-program c:\testbed.exe -programToMonitorEXE "c:\program files\dotnet\dotnet.exe" -programToMonitorDLL c:\test\dotNetCoreApp.dll

 

In this last example c:\testbed.exe is launched but not monitored. Only when testbed.exe launches a child process c:\program files\dotnet\dotnet.exe to run the application c:\test\dotNetCoreApp.dll is that child process monitored.

 

 

-programToMonitorLaunchCount

 

Specify the nth invocation of the child program specified by -programToMonitor which is to have its data collected.

 

Any value which is invalid (including anything less than 1) will default to 1.

 

Only valid in conjunction with -programToMonitor and consequently also -program.

 

Examples:

 

-programToMonitorLaunchCount 1

-programToMonitorLaunchCount 34

 

-program c:\testbed.exe -programToMonitor c:\testbed-child-process.exe -programToMonitorLaunchCount 1

 

In the above example c:\testbed.exe is launched but not monitored. As soon as testbed.exe launches a child process c:\testbed-child-process.exe then that child process is monitored.

 

If the value 1 was changed to a 2, then only the second invocation of c:\testbed-child-process.exe would get monitored, with the first invocation being ignored.

 

 

-environment

 

Environment variables for program, as a series of name/value pairs. Not to be confused with -setenvironment.

 

Use this option once for each environment variable you wish to set.

 

note To pass quotes along with the string, escape a pair of inner quotes like the example below

 

Only valid with: -program

 

Examples:

 

-environment APP_FLAG=ON;

-environment "APP_FAG=ON;"

-environment "APP_COMMS=ON; APP_DEBUG=OFF;"
-environment "APP_MSG=\"A quoted string with spaces\";"
 

 

-arg

 

Passes the following element on the command line to the target program.

 

-arg can be used multiple times, or you can use -allArgs

 

note To pass quotes along with the string, escape a pair of inner quotes like the example below

 

Only valid with: -program

 

Examples:

 

-arg myProgram.exe

-arg "c:\Program Files\myApp\myProgram.exe"

-arg "-in infile -out outfile"
-arg "\"a quoted string\""
 

 

-allArgs

 

Passes the remainder of the command line (after -allArgs) to the program being launched.

 

Unlike -arg above, there is no need to escape the quotes as the content is passed verbatim.

 

Only valid with: -program

 

Example:

 

-allArgs anything put here is passed to the target program "even stuff in quotes" is passed

 

 

-directory

 

Sets the working directory in which the program is executed. If -directory is not specified the program is run in its current directory.

 

Only valid with: -program

 

Examples:

 

-directory c:\development\

-directory "c:\research and development\"

 

 

-stdin

 

Specifies a file to be read and piped to the standard input of the application being tested.

 

If the filename contains spaces, the filename should be quoted.

 

An error occurs if the file does not exist. See -ignoreMissingStdin to avoid this error.

 

Examples:

 

-stdin c:\settings\input.txt

-stdin "c:\reg tests settings\input.txt"

 

 

-stdout

 

Specifies a file to be written with data piped from the standard output of the application being tested.

 

If the filename contains spaces, the filename should be quoted.

 

An error occurs if the file does not exist. See -ignoreMissingStdout to avoid this error.

 

Examples:

 

-stdout c:\settings\output.txt

-stdout "c:\reg tests results\output.txt"

 

 

-ignoreMissingStdin

 

If this flag is specified and the file specified by -stdin does not exist, no error is reported.

 

 

-ignoreMissingStdout

 

If this flag is specified and the file specified by -stdout does not exist, no error is reported.

 

 

Injecting into a program

 

-injectName

 

Sets the name of the process for Bug Validator to attach to.

 

Not compatible with -program, -injectID, -waitName or -monitorAService.

 

Examples:

 

-injectName c:\testbed.exe

-injectName "c:\new compiler\version2\testbed.exe"

 

 

-injectID

 

Sets the numeric id of a process for Bug Validator to attach to.

 

Not compatible with -program, -injectName, -waitName or -monitorAService.

 

Example:

 

-injectID 1032

 

 

Waiting for a program

 

-waitNameEXE

   -waitName

 

-waitName has been replaced by -waitNameEXE. -waitName will be honoured to provided backwards compatibility.

 

Sets the name of a process that Bug Validator will wait for.

 

When the named process starts Bug Validator will attach to the process.

 

Not compatible with -program, -injectName, -injectID or -monitorAService.

 

Examples:

 

-waitNameEXE c:\testbed.exe

-waitNameEXE "c:\new compiler\version2\testbed.exe"

 

 

-waitNameDLL

 

Sets the name of a process DLL that Bug Validator will wait for.

 

When the named process starts Bug Validator will attach to the process.

 

Examples:

 

-waitNameDLL c:\dotNetApp.dll

-waitNameDLL "c:\new compiler\version2\dotNetApp.dll"

 

 

For use with -waitNameEXE when you want to wait for .Net Core applications.

 

-waitNameEXE "c:\program files\dotnet\dotnet.exe" -waitNameDLL "c:\testApps\dotNetCoreApp\release\dotNetCoreApp.dll"

 

 

Monitoring a service

 

-monitorAService

 

Sets the full file system path of a service including any extension.

 

Bug Validator will wait for the service to start and attach to it.

 

Not compatible with -program, -injectName, -injectID or -waitName.

 

Examples:

 

-monitorAService c:\service.exe

-monitorAService "c:\new compiler\version2\service.exe"

 

 

Data Collection

 

-collectData

 

Enables or disables the collection of flow tracing data

 

Examples:

 

 -collectData:On

 -collectData:Off

 

 

-collectStdout

 

Enables or disables the collection of standard output (stdout)

 

Examples:

 

 -collectStdout:On

 -collectStdout:Off