Skip to content

PowerShell crash when breakpoint hit testing DSC resources #99

@BrianFarnhill

Description

@BrianFarnhill

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions