Skip to content

PowerShell crash when breakpoint hit testing DSC resources #99

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
BrianFarnhill opened this issue Feb 16, 2016 · 5 comments
Closed

PowerShell crash when breakpoint hit testing DSC resources #99

BrianFarnhill opened this issue Feb 16, 2016 · 5 comments

Comments

@BrianFarnhill
Copy link

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.

@daviwil
Copy link
Contributor

daviwil commented 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
Copy link
Author

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
Copy link
Contributor

daviwil commented 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
Copy link
Author

Dude that is beautiful, it work's great! Thanks for the super fast response!

@daviwil
Copy link
Contributor

daviwil commented Feb 16, 2016

Glad to hear it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants