Wait-Debuggerwithin your scripts to cause them to pause. Once paused, you will be able to access the runspace by navigating to Platform \ Debugging
$VerbosePreference, you will also see those streams in the console output. You can add additional log messages using
$DebugPreferencevariable to get additional information during your dashboard startup.
Wait-Debuggercommand somewhere in your script.
Wait-Debuggercommand in the script that you want to debug, you'll need to start the script and determine the process it is running within.
Wait-Debuggercommand. Once your job has started, you can use the
Get-UAJobcmdlet to find that job's process ID.
Universal.Server.exeprocess and attach to that.
Universal.Server.exeprocess. You will need to attach to this process in order to debug them.
Enter-PSHostProcess. Simply specify the process ID that you found in the previous step.
Get-Runspacecmdlet. This will return a list of runspaces currently active in your process. Look for the runspace marked
InBreakpoint. This is the runspace waiting on the
Debug-Runspaceto attached to the runspace. You will now have the opportunity to issue debugging commands against that runspace. You can view the status of variables, issue commands and even step through the script.