Skip to content

Commit 31dd0af

Browse files
committed
Add snippet and dynamic launch profile for Windows PowerShell
1 parent f25224e commit 31dd0af

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,16 @@
529529
"createTemporaryIntegratedConsole": true,
530530
"attachDotnetDebugger": true
531531
}
532+
},
533+
{
534+
"label": "PowerShell: Windows PowerShell Temporary Console",
535+
"description": "(Windows Only) Launch a temporary Windows PowerShell console for debugging. This is useful for debugging legacy scripts that require Windows PowerShell.",
536+
"body": {
537+
"name": "PowerShell: Windows PowerShell",
538+
"type": "PowerShell",
539+
"request": "launch",
540+
"temporaryIntegratedConsoleExeName": "Windows PowerShell (x64)"
541+
}
532542
}
533543
],
534544
"configurationAttributes": {

src/features/DebugSession.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export enum DebugConfig {
5656
ModuleInteractiveSession,
5757
BinaryModule,
5858
BinaryModulePester,
59+
WindowsPowerShell,
5960
}
6061

6162
/** Make the implicit behavior of undefined and null in the debug api more explicit */
@@ -126,6 +127,12 @@ export const DebugConfigurations: Record<DebugConfig, DebugConfiguration> = {
126127
createTemporaryIntegratedConsole: true,
127128
attachDotnetDebugger: true,
128129
},
130+
[DebugConfig.WindowsPowerShell]: {
131+
name: "PowerShell: Windows PowerShell",
132+
type: "PowerShell",
133+
request: "launch",
134+
temporaryIntegratedConsoleExeName: "Windows PowerShell (x64)",
135+
},
129136
};
130137

131138
export class DebugSessionFeature

0 commit comments

Comments
 (0)