You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add option for debugging scripts in a temporary Integrated Console
This change enables the user to configure their debugging sessions to
launch a temporary Integrated Console each time they start the debugger.
This is useful when debugging scripts or modules which use PowerShell
classes or managed assemblies which cannot be reloaded within the same
process.
Resolves#367.
Copy file name to clipboardExpand all lines: package.json
+32Lines changed: 32 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -211,6 +211,19 @@
211
211
"cwd": "^\"\\${file}\""
212
212
}
213
213
},
214
+
{
215
+
"label": "PowerShell: Launch Current File in Temporary Console",
216
+
"description": "Launch current file (in active editor window) under debugger in a temporary Integrated Console.",
217
+
"body": {
218
+
"type": "PowerShell",
219
+
"request": "launch",
220
+
"name": "PowerShell Launch Current File in Temporary Console",
221
+
"script": "^\"\\${file}\"",
222
+
"args": [],
223
+
"cwd": "^\"\\${file}\"",
224
+
"createTemporaryIntegratedConsole": true
225
+
}
226
+
},
214
227
{
215
228
"label": "PowerShell: Launch - Current File w/Args Prompt",
216
229
"description": "Launch current file (in active editor window) under debugger, prompting first for script arguments",
@@ -292,6 +305,11 @@
292
305
"type": "string",
293
306
"description": "Absolute path to the working directory. Default is the current workspace.",
294
307
"default": "${workspaceRoot}"
308
+
},
309
+
"createTemporaryIntegratedConsole": {
310
+
"type": "boolean",
311
+
"description": "Determines whether a temporary PowerShell Integrated Console is created for each debugging session, useful for debugging PowerShell classes and binary modules. Overrides the user setting 'powershell.debugging.createTemporaryIntegratedConsole'.",
312
+
"default": false
295
313
}
296
314
}
297
315
},
@@ -323,6 +341,15 @@
323
341
"args": [],
324
342
"cwd": "${file}"
325
343
},
344
+
{
345
+
"type": "PowerShell",
346
+
"request": "launch",
347
+
"name": "PowerShell Launch Current File in Temporary Console",
348
+
"script": "${file}",
349
+
"args": [],
350
+
"cwd": "${file}",
351
+
"createTemporaryIntegratedConsole": true
352
+
},
326
353
{
327
354
"type": "PowerShell",
328
355
"request": "launch",
@@ -448,6 +475,11 @@
448
475
"default": true,
449
476
"description": "Switches focus to the console when a script selection is run or a script file is debugged. This is an accessibility feature. To disable it, set to false."
"description": "Determines whether a temporary PowerShell Integrated Console is created for each debugging session, useful for debugging PowerShell classes and binary modules."
482
+
},
451
483
"powershell.developer.bundledModulesPath": {
452
484
"type": "string",
453
485
"description": "Specifies an alternate path to the folder containing modules that are bundled with the PowerShell extension (i.e. PowerShell Editor Services, PSScriptAnalyzer, Plaster)"
0 commit comments