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:
- Click File / Open and open the folder containing the PowerShell script,
- Click the script that you want to edit in the left-hand pane,
- Set breakpoints where you want them by clicking on the margin by the corresponding script line,
- Press F5 or click the run button in the editor:
Happy scripting!
0 Responses to “Fixing “Debug adapter process has terminated unexpectedly” error in VSCode for PowerShell”