Available Command LineArguments
The following list presents all the arguments that can be provided on the command line. Most arguments have a long form and a short form. Both forms can be used, but the long form may be more suitable in response files and the short for more suitable on the command line. For more information about the settings that can be changed using these options, see Session Settings.
Note
Considering the amount of options available, it is recommended that a profiler project is used instead of providing session settings on the command line. A profiler project can be defined using the user interface in .NET Memory Profiler and then provided on the command line using the /project argument.
Argument | Short form | Description |
---|---|---|
/appdomaintracker[+/-] | /adt | Boolean option. Indicates whether AppDomain tracking should be enabled. |
/apppools | /ap | String option. Semicolon delimited list of AppPool names that should be profiled, when profiling IIS. |
/asp | /asp | This option enables ASP.NET profiling. May not be used with /program or /service. |
/attach <pid> /attach <process name> |
/a | Attach to a running process using the profiling API. Specify the process using process id or process name, e.g. /a 1234, or /a SomeProcess.exe. Requires that the process runs under .NET Framework 4.0 and has concurrent GC disabled. For more information, see Attach to Process using Profiling API. |
/attachtype <type> | /at | Specifies the attach type. Can be used together with /attach to specify how the process should be attached. Overrides the “/inspectionattach” argument. Available options: inspection, api. |
/autocollect <interval> | /ac | Integer option. Enables automatic snapshot collection and sets the collection time interval (in minutes). |
/callstacks[+/-] | Boolean option. Enables or disables the collection of allocation call stacks. | |
/collectandstop <count> | /cs | Integer option (optional). Collects the specified number of snapshots and then stops the profiler. The snapshot collection interval is specified using the /autocollect argument. If the /autocollect argument is not included, the default collection interval of 10 minutes is used. |
/collectrealtime[+/-] | /cr | Boolean option. Enables or disables the real-time data collection. May not be used with /delaycleanup. |
/disableinlining[+/-] | /di | Boolean option. Enables or disables inlining of methods. May not be used with /nativeprofiling. |
/disposetracker[+/-] | /dt | Boolean option. Enables or disables the dispose tracker. May not be used with /nativeprofiling. |
/heaputil[+/-] | /hu | Boolean option. Enables or disables the heap utilization tracker. |
/iisexpressconfig | String path. Specifies the path to the IIS Express config file. | |
/includeinstancedata[+/-] | /iid | Boolean option. Indicates whether instance data should be included in the auto-saved heap snapshots. |
/inspectionattach <pid> /inspectionattach <process name> |
/ia | Attach to a running process using the inspection only attach. Specify the process using process id or process name, e.g. /a 1234, or /a SomeProcess.exe. |
/instancetracking <level> | /it | |
/maxgraphmemory <kbytes> | /mg | Integer option. Only used if collecting real-time data. It defines the maximum amount of memory (in kilobytes) to use for real-time data for classes included in the real-time graph. |
/maxnographmemory <kbytes> | /mng | Integer option. Only used if collecting real-time data. It defines the maximum amount of memory (in kilobytes) to use for real-time data for classes not included in the real-time graph. |
/maxsnapshots <count> | /ms | Integer option. Defines the maximum number of software triggered heap snapshots. |
/memleakcollect[+/-] | /mlc | Boolean option. Indicates whether a full heap snapshot should be collected when a memory leak is detected. |
/memleakprompt[+/-] | /mlp | Boolean option. Indicates whether the user should be prompted for an action when a memory leak is detected. |
/memleakstartui[+/-] | /mlui | Boolean option. Indicates whether the user interface should be started when a memory leak is detected. |
/memleakstopsession[+/-] | /mlss | Boolean option. Indicates whether the profiling session should be stopped when a memory leak is detected. |
/memleaksuspend[+/-] | /mlsu | Boolean option. Indicates whether the profiled process should be suspended while a detected memory leak is being handled. |
/noui | /noui | Runs the profiler in non-interactive mode. If this option is used, a process to profile must also be specified. |
/open <file path> | /open | String option. Opens the previously saved session file specified by the option value. This option may not be used with any other options. |
/passthrough[+/-] | /pt | Boolean option. If true, then the exit code of the profiled process will be returned from the profiler instead of the standard exit code. |
/peaksnapshot[+/-] | /ps | Boolean option. Enables or disables peak snapshot collection. |
/peaksnapshotthreshold | /pst | Integer option. The threshold in percent for collecting a peak memory snapshot. |
/profileprocess | /pp | String option. Defines the processes that should be profiled. Available option are: all, first, started. |
/profilingtype <type> | String option. Specifies the profiling type. Can be used instead of the specific profiling arguments (such as /iis, /service, /attach). Available options are: Application, Service, IIS, WebDevServer, Silverlight, Attach, WpfBrowserApplication, MemoryDumpImport, IISExpress, WinStoreApp, UnitTest. | |
/program <file path> | /p | String option. The option value specifies the path of a program to profile. This option must be the last option, since subsequent arguments are used as arguments for the profiled program. This option is the default option, so it is possible to specify the program to profile by simply providing the path to the program without the parameter name (/program or /p). May not be used with /service or /asp. |
/properties | /prop | String option. Semicolon delimited list of properties that can be used by the profiler project using MSBuild property notification. E.g. the path to the executable to profile can be specified using “/prop:ExePath=c:\Dev\SomeProject\bin\SomeProject.exe” and then be used in the profiler project as $(ExePath. |
/project <file path> | /prj | String option. The option value specifies the path of a profiler project. The settings of the project are used to start profiling a new session. If a process to profile is specified using /program, /service or /asp this will override the launch settings in the profiler project. |
/resourcetracker[+/-] | /rt | Boolean option. Indicates whether the native resources tracker should be enabled. |
/rootidentification[+/-] | /ri | Boolean option. Enables or disables root identification. May not be used with /nativeprofiling. |
/saveproject[+/-] | /sprj | Boolean option. Indicates whether the project specified by /project should be automatically saved if a session has been added to it. The default setting is to save the project; to avoid saving provide the argument “/saveproject–“. This option only affects the profiler when running in non-interactive mode. |
/service <service name> | /svc | String option. The option value specifies the name of a service to profile. May not be used together with /program or /asp. |
/sessionend <option> | /se | String option. Specifies the action to be performed when the profiling session is ended. The available options are: prompt, save, savesnapshots, discard. |
/sessionfile <file path> | /sf | String option. The option value defines the name of the file to which auto-saved session files should be saved. The file name can include the strings %DATE% and %TIME%. These strings will be replaced with the current date and time when the session is saved. |
/sessionfolder <folder path> | /sfl | String option. The option value defines the folder in which auto-saved session files should be saved. It is recommended that this argument is avoided, instead use /sessionfile to specify the full path of the session file |
/sessionprompt[+/-] | /sp | Boolean option. Indicates whether the user should be prompted for an action when a session is ended. |
/shadowsymbols[+/-] | Boolean option, Indicates whether a shadow copy should be made of the symbol files. To be enable to recompile an assembly while profiling (e.g. when running unit tests), this option must be enabled. Note, this option affects all sessions started by the profiler, not just the one started first. | |
/snapshotselect[+/-] | /ss | Boolean option. Indicates whether the user should be allowed to select which snapshots to include when saving the profiling session. |
/winstoreapp <app user model id> | String option. Specifies the Windows store application user model id. | |
/winstorepackage <package id> | String option. Specifies the Windows store application package to profile. | |
/workingdirectory <path> | /wd | String option. Specifies the working directory of the profiled process. |