Enable-RunspaceDebug
Enables debugging on runspaces where any breakpoint is preserved until a debugger is attached.
Syntax
RunspaceNameParameterSet (Default)
Enable-RunspaceDebug
[[-RunspaceName] ]
[-BreakAll]
[]
RunspaceParameterSet
Enable-RunspaceDebug
[-Runspace]
[-BreakAll]
[]
RunspaceIdParameterSet
Enable-RunspaceDebug
[-RunspaceId]
[-BreakAll]
[]
RunspaceInstanceIdParameterSet
Enable-RunspaceDebug
[-RunspaceInstanceId]
[]
ProcessNameParameterSet
Enable-RunspaceDebug
[[-ProcessName] ]
[[-AppDomainName] ]
[]
Description
The Enable-RunspaceDebug cmdlet enables debugging on runspaces where any breakpoint is preserved
until a debugger is attached.
Examples
1: Enable the default runspace debugger
Enable-RunspaceDebug
Get-RunspaceDebug
Id Name Enabled BreakAll
-- ---- ------- --------
1 Runspace1 True False
Parameters
-AppDomainName
The name of the application domain that hosts the PowerShell runspace.
Parameter properties
Type: String [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ProcessNameParameterSet
Position: 1
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-BreakAll
Causes any running command or script in the Runspace to stop in step mode, regardless of whether a
debugger is currently attached. The script or command will remain stopped until a debugger is
attached to debug the current stop point.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
RunspaceNameParameterSet
Position: 1
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
RunspaceParameterSet
Position: 1
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
RunspaceIdParameterSet
Position: 1
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ProcessName
The name of the process that hosts the PowerShell runspace.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ProcessNameParameterSet
Position: 0
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Runspace
One or more Runspace objects to be disabled.
Parameter properties
Type: Runspace [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
RunspaceParameterSet
Position: 0
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: True
Value from remaining arguments: False
-RunspaceId
One or more Runspace Id numbers to be disabled.
Parameter properties
Type: Int32 [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
RunspaceIdParameterSet
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RunspaceInstanceId
One or more Runspace GUIDs to be disabled.
Parameter properties
Type: Guid [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
RunspaceInstanceIdParameterSet
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RunspaceName
One or more Runspace names to be disabled.
Parameter properties
Type: String [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
RunspaceNameParameterSet
Position: 0
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .