Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/features/DebugSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,12 @@ export class PickPSHostProcessFeature implements IFeature {

private pickPSHostProcess(): Thenable<string> {
return this.languageClient.sendRequest(GetPSHostProcessesRequestType, null).then((hostProcesses) => {
const items: IProcessItem[] = [];
// Start with the current PowerShell process in the list.
const items: IProcessItem[] = [{
label: "Current",
description: "The current PowerShell Integrated Console process.",
pid: "current",
}];

for (const p in hostProcesses) {
if (hostProcesses.hasOwnProperty(p)) {
Expand Down Expand Up @@ -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;
}

Expand Down