Is there a way to not reset the runspace after debugging? I think it's a handy feature to be able to inspect variables after a debugging session and see last values.
PowerShell ISE does this by default, PowerGUI Script Editor has an option for it:
Would be nice to have such an option in Studio!
Reset Runspace
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Re: Reset Runspace
When debugging the runspace is always reset for various reasons, mostly so you can verify the script will run on any machine without worrying about profiles or any preconfigured settings.
That being said, you can still inspect variables during and after debugging sessions a couple different ways:
- While debugging or after debugging you can mouse over variables in the text editor and it will show you it's last known value:
- You can add the variable to the Watch Panel by right clicking on the variable you wish to monitor and select Add to Watch, then during and after debug they appear in the Watch Panel:
That being said, you can still inspect variables during and after debugging sessions a couple different ways:
- While debugging or after debugging you can mouse over variables in the text editor and it will show you it's last known value:
- You can add the variable to the Watch Panel by right clicking on the variable you wish to monitor and select Add to Watch, then during and after debug they appear in the Watch Panel:
DevinL
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Reset Runspace
During debugging that obviously works, however on my system I cannot see last value when I hover over a variable and the Watch doesn't show anything either:
Re: Reset Runspace
In that case I'll look into this a bit more closely but I need some more information.
In a previous post you mentioned that you're using the 64-bit version of Windows 10, and the 64 bit version of PowerShell Studio, can you provide me with the PowerShell version as well as the version number of PowerShell Studio?
In a previous post you mentioned that you're using the 64-bit version of Windows 10, and the 64 bit version of PowerShell Studio, can you provide me with the PowerShell version as well as the version number of PowerShell Studio?
DevinL
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Reset Runspace
Actually a real quick follow up:
I spoke with the developers and it turns out you have to hit a breakpoint for the values to be stored in the Watch Panel or in the mouse-over of the variable. So if you set a breakpoint after any point you'd like to know the value, it's stored in the Watch Panel and for the mouse-over.
Maintaining the runspace between debugging sessions is something we're looking at adding in the future and unfortunately I cannot provide a timetable as to when that will happen.
I spoke with the developers and it turns out you have to hit a breakpoint for the values to be stored in the Watch Panel or in the mouse-over of the variable. So if you set a breakpoint after any point you'd like to know the value, it's stored in the Watch Panel and for the mouse-over.
Maintaining the runspace between debugging sessions is something we're looking at adding in the future and unfortunately I cannot provide a timetable as to when that will happen.
DevinL
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.