title: Setting up VScode to debug pwsh and Powershell scripts
body: <p>I have been using vscode for developing/debugging my pwsh core scripts for a while. I normally work on windows, so I have set my default terminal to point to pwsh.exe, and my debugging experience is normally great. I still have a few scripts that use powershell 5/.net framework dependencies, and I would like to have a separate configuration that I can run to specify to use the windows powershell exe instead of the integrated terminal/pwsh.exe that I use as a default.</p>
  <p>I have the PowerShell Extension installed, and in <code>settings.json</code> I have</p>
  <pre><code>&quot;powershell.powerShellDefaultVersion&quot;: &quot;pwsh 7&quot;
  </code></pre>
  <p>If I change this to</p>
  <pre><code>&quot;powershell.powerShellDefaultVersion&quot;: &quot;Windows Powershell (x86)&quot;
  </code></pre>
  <p>and hit F5, the extension will launch windows powershell like I would expect.</p>
  <p>I would like to create a launch.json file that has configurations for both, so I can use my default pwsh as a default, and choose to use the windows powershell for specific scripts that I am working with.</p>
  <p>I have tried adding <code>console</code> and <code>program</code> properties to the config template that vscode generates to point to the powershell.exe but they seem to be ignored.</p>
  <p>example launch.json</p>
  <pre><code>{
       &quot;name&quot;: &quot;PowerShell: Launch Current File&quot;,
       &quot;type&quot;: &quot;PowerShell&quot;,
       &quot;request&quot;: &quot;launch&quot;,
       &quot;script&quot;: &quot;${file}&quot;,
       &quot;cwd&quot;: &quot;${file}&quot;,
       &quot;program&quot;: &quot;C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe&quot;
  }
  </code></pre>