Description
I'm currently testing out VS Code as a tool to run my pester tests for xSharePoint and I'm finding that when I set break points in my resources I see the following error message about PowerShell crashing when the script gets to my breakpoint:
Error - Debug adapter process has terminated unexpectedly
For reference, the launch.json file we use is here, we just wrap up a call to a script which calls Invoke-Pester for us (our call to Invoke-Pester is a little more complex because we pass a few modules to simulate different SP versions in so splitting it out to a seperate file seemed the cleaner option).
It's worth noting that if I don't set any breakpoints all my Pester tests run fine and I see the output in the debug window. Would appreciate some pointers on how to troubleshoot what's happening in here though so I can figure out why the breakpoints don't seem to work.
Activity
daviwil commentedon Feb 16, 2016
Hey Brian,
Which version of the PowerShell extension are you using? You can find it by hitting
Ctrl+Shift+P
and run the command 'Show Installed Extensions'. When you see the PowerShell extension in that list, the version will be displayed to the right.We fixed an issue with Pester tests crashing in the debugger for version 0.4.0 so I'd like to check if you've got the latest version.
BrianFarnhill commentedon Feb 16, 2016
Ahhhh, that could be it - I thought I updated before submitting this, but I'm running 0.3.1 - what's the easiest way to tell it to update?
daviwil commentedon Feb 16, 2016
Similarly, run the 'Show Outdated Extensions' command and there should be an update button to the right of the PowerShell item. Once the new version installs it'll ask you to restart. Give it a shot after that and let me know if it still crashes.
BrianFarnhill commentedon Feb 16, 2016
Dude that is beautiful, it work's great! Thanks for the super fast response!
daviwil commentedon Feb 16, 2016
Glad to hear it!