Problems with Debugging Dashboards in Development

Product: PowerShell Universal
Version: 3.5.4

I feel like I’m missing something here but I’ve been trying to develop and debug PSU Dashboards for around a year now but I’ve found debugging dashboard is extremely problematic to the point I simply can’t use the feature, I’m trying to work out if I’m just doing something wrong.

Too often a dashboard will simply have a header off “Error with dashboard script” with nothing listed in Dashboard Log, no Write-* Cmdlets, or other Cmdlets, seem to have run, no exceptions, no errors, nothing from pipeline, it leaves me with no information on what has actually gone wrong.

For those Dashboard scripts running well enough to get pass that issue; if I use Wait-Debugger to trigger a breakpoint, Enter-PSHostProcess of the relevant process and use Debug-Runspace on the runspace with the breakpoint, I will often get no output or shell, making the breakpoint useless.

I also notice if I restart a Dashboard script often enough, it will eventually have some sort of silent issue where it will no longer start properly (despite saying it’s “Started”), acting as if no Cmdlets are being run at all. The only way to fix this is to restart the PowerShellUniversal Windows Service.

No error information, unreliable breakpoints and a finite limit to how many dashboard restarts in one lifespan of the PSU service… does anyone else have these issues? How are other people debugging their dashboards during development? How can I begin to troubleshooting some of these issues?