The following setting let's you configure that each deugging session should start it's own temporary integrated console.
"powershell.debugging.createTemporaryIntegratedConsole": true
Problem however is that this always creates PS Core
session and I would like temporary session to be Windows PowerShell
I have configured which terminal is default in user settings like this:
"terminal.integrated.profiles.windows": {
"PowerShell Core": {
"path": "C:\\Program Files\\PowerShell\\7\\pwsh.exe",
"color": "terminal.ansiRed",
"overrideName": true
},
"Windows PowerShell": {
"path": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"color": "terminal.ansiBlue",
"overrideName": true
}
},
// Use Windows PowerShell by default
"terminal.integrated.defaultProfile.windows": "Windows PowerShell",
However this works only when you manually create a new session in VSCode
,
but temporary console used by the debugger is still PS Core
launch.json
doesn't allow console
property to be set for debugger provided by PowerShell extension
How do I force temporary debugging console to use Windows PowerShell
?
CodePudding user response:
The
"terminal.integrated.profiles.windows"
settings are for general-purpose shells running in Visual Studio Code's integrated terminal.The special-purpose shell that comes with the PowerShell extension, the so-called PowerShell Integrated Console (PIC), is what enables debugging, and its settings are separate from those for the general-purpose shells.
See the bottom section of this answer for how to control what PowerShell edition is used in the PIC.