If I attempt to examine the PowerShell $PSBoundParameters automatic variable during a PowerShell debugging session (eg. PowerShell ISE or Quest PowerGUI Script Editor), I cannot retrieve its value. However, if I simply allow the function to echo the $PSBoundParameters object to the pipeline, it renders as expected.
Does anyone know why this is? I would expect to be able to examine all in-scope variable during a debugging session, whether they are automatic, or user-defined.
It seems to work for me if I assign it to a variable and look at the variable like this:
I couldn’t inspect
$PSBoundParameterswhile debugging but I could inspect$test. I’m not sure why this is, but at least you can use this as a work around.