#10338 removed the ScriptDebugger.SetBreakpoints() API, allowing .NET code to set breakpoints.
Although previous PowerShells didn't have a convenient way to create a breakpoint object, removing this API means there's no way to avoid reflection when setting a breakpoint in a PowerShell module targeting anything prior to PS 7.
This is an issue for PowerShellEditorServices, where good debugging APIs are already scarce. A break like this will crash PSES unexpectedly (since PSStandard doesn't pick it up) and the only fix is to use reflection to find the right call at runtime (nullifying the reason to use PSStandard).
#10338 removed the
ScriptDebugger.SetBreakpoints()API, allowing .NET code to set breakpoints.Although previous PowerShells didn't have a convenient way to create a breakpoint object, removing this API means there's no way to avoid reflection when setting a breakpoint in a PowerShell module targeting anything prior to PS 7.
This is an issue for PowerShellEditorServices, where good debugging APIs are already scarce. A break like this will crash PSES unexpectedly (since PSStandard doesn't pick it up) and the only fix is to use reflection to find the right call at runtime (nullifying the reason to use PSStandard).