Fixing “Debug adapter process has terminated unexpectedly” error in VSCode for PowerShell

VSCode is the primary tool that Microsoft provides on Linux and Mac OS to edit and debug PowerShell scripts. Yet, on MacOS, with default installation, you are likely to get the “Debug adapter process has terminated unexpectedly” when you try running your scripts.

However, to fix this issue you simply need to install OpenSSL on your Mac running VSCode as described here.

Once this is done, simply:

  1. Click File / Open and open the folder containing the PowerShell script,
  2. Click the script that you want to edit in the left-hand pane,
  3. Set breakpoints where you want them by clicking on the margin by the corresponding script line,
  4. Press F5 or click the run button in the editor:

Debugging PowerShell scripts on Mac OS X in VSCode

Happy scripting!

0 Responses to “Fixing “Debug adapter process has terminated unexpectedly” error in VSCode for PowerShell”



  1. Leave a Comment

Leave a comment




Legal

The posts on this blog are provided “as is” with no warranties and confer no rights. The opinions expressed on this site are mine and mine alone, and do not necessarily represent those of my employer - WSO2 or anyone else for that matter. All trademarks acknowledged.

© 2007-2014 Dmitry Sotnikov

August 2016
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
293031