From 01e92be12519feb25a9c6c44554ec0c65572589c Mon Sep 17 00:00:00 2001 From: Tyler Leonhardt Date: Mon, 18 Mar 2019 11:49:57 -0700 Subject: [PATCH 1/3] include current runspace and runspace 1 if should --- src/features/DebugSession.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/features/DebugSession.ts b/src/features/DebugSession.ts index 1c071af8ee..419dc6ff8e 100644 --- a/src/features/DebugSession.ts +++ b/src/features/DebugSession.ts @@ -358,7 +358,12 @@ export class PickPSHostProcessFeature implements IFeature { private pickPSHostProcess(): Thenable { return this.languageClient.sendRequest(GetPSHostProcessesRequestType, null).then((hostProcesses) => { - const items: IProcessItem[] = []; + // Start with the current PowerShell process to the list. + const items: IProcessItem[] = [{ + label: "Current", + description: "The current PowerShell process.", + pid: "current", + }]; for (const p in hostProcesses) { if (hostProcesses.hasOwnProperty(p)) { @@ -487,7 +492,8 @@ export class PickRunspaceFeature implements IFeature { for (const runspace of response) { // Skip default runspace - if (runspace.id === 1 || runspace.name === "PSAttachRunspace") { + if ((runspace.id === 1 || runspace.name === "PSAttachRunspace") + && processId === "current") { continue; } From 39bf6b206753bfa3a4f95bf84adb23e407f5db7c Mon Sep 17 00:00:00 2001 From: Tyler Leonhardt Date: Mon, 18 Mar 2019 11:52:18 -0700 Subject: [PATCH 2/3] to => in --- src/features/DebugSession.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/features/DebugSession.ts b/src/features/DebugSession.ts index 419dc6ff8e..3a7fdd72d3 100644 --- a/src/features/DebugSession.ts +++ b/src/features/DebugSession.ts @@ -358,7 +358,7 @@ export class PickPSHostProcessFeature implements IFeature { private pickPSHostProcess(): Thenable { return this.languageClient.sendRequest(GetPSHostProcessesRequestType, null).then((hostProcesses) => { - // Start with the current PowerShell process to the list. + // Start with the current PowerShell process in the list. const items: IProcessItem[] = [{ label: "Current", description: "The current PowerShell process.", From 906cd5bcbf0bbbc473123b079af67e3e8546242e Mon Sep 17 00:00:00 2001 From: Tyler James Leonhardt Date: Mon, 18 Mar 2019 16:06:42 -0700 Subject: [PATCH 3/3] more explicit --- src/features/DebugSession.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/features/DebugSession.ts b/src/features/DebugSession.ts index 3a7fdd72d3..8943ced400 100644 --- a/src/features/DebugSession.ts +++ b/src/features/DebugSession.ts @@ -361,7 +361,7 @@ export class PickPSHostProcessFeature implements IFeature { // Start with the current PowerShell process in the list. const items: IProcessItem[] = [{ label: "Current", - description: "The current PowerShell process.", + description: "The current PowerShell Integrated Console process.", pid: "current", }];