Skip to content

Commit cd67c0e

Browse files
jborean93Copilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <[email protected]>
1 parent 9cf84d2 commit cd67c0e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

module/PowerShellEditorServices/Commands/Public/Start-DebugAttachSession.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ function Start-DebugAttachSession {
120120
$configuration.computerName = $ComputerName
121121
}
122122

123-
if ($RunspaceId) {
123+
if ($PSBoundParameters.ContainsKey('RunspaceId')) {
124124
$configuration.runspaceId = $RunspaceId
125125
}
126126
elseif ($RunspaceName) {

module/docs/Start-DebugAttachSession.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ schema: 2.0.0
88

99
## SYNOPSIS
1010

11-
Starts a new debug session attached to the specified PowerShell instance..
11+
Starts a new debug session attached to the specified PowerShell instance.
1212

1313
## SYNTAX
1414

@@ -28,7 +28,7 @@ Start-DebugAttachSession [-Name <String>] [-CustomPipeName <String>] [-RunspaceN
2828

2929
The Start-DebugAttachSession function can be used to start a new debug session that is attached to the specified PowerShell instance. The caller must be running in an existing launched debug session and the newly attached session will be treated as a child debug session in a new temporary console. If the callers script ends before the new debug session is completed, the debug session for the child will also end.
3030

31-
The function will return once the attach reponse was received by the debug server. For an example, an attach request will return once PowerShell has attached to the process and has called `Debug-Runspace`. If you need to return early use the `-AsJob` parameter to return a `Job` object immediately that can be used to wait for the response at a later time.
31+
The function will return once the attach response was received by the debug server. For an example, an attach request will return once PowerShell has attached to the process and has called `Debug-Runspace`. If you need to return early use the `-AsJob` parameter to return a `Job` object immediately that can be used to wait for the response at a later time.
3232

3333
If `-ProcessId` or `-CustomPipeName` is not specified, the debug client will prompt for process to connect to. If `-RunspaceId` or `-RunspaceName` is not specified, the debug client will prompt for which runspace to connect to.
3434

@@ -95,7 +95,7 @@ Accept wildcard characters: False
9595
9696
### -ComputerName
9797
98-
The computer name to which a remote session with be established before attaching to the target runspace. If specified, the temporary console will run `Enter-PSSession -ComputerName ...` to connect to a host over WSMan before attaching to the requested PowerShell instance.
98+
The computer name to which a remote session will be established before attaching to the target runspace. If specified, the temporary console will run `Enter-PSSession -ComputerName ...` to connect to a host over WSMan before attaching to the requested PowerShell instance.
9999

100100
```yaml
101101
Type: String

0 commit comments

Comments
 (0)