I cannot properly debug PS scripts with Forms in Visual Studio 2019 and PSProTools 5.4.4

I will summarize the two problems I am having, an will show the details later.

They can be easily reproduced, so I need your guidance on how to start a proper Trace.

  1. When debugging I try to watch an object, and I cannot expand its members. All objects are shown are System.String. I am not sure if this is happening since I updated PSProTools or Visual Studio.

  2. Also when debugging, and in my code I try to open a FolderBrowserDialog (It happens the same with OpenFileDialog), Visual Studio just stops, and it is impossible to find the dialog window to continue. This did not happen a few weeks ago. I have to cancel the Powershell task of Visual Studio in order to break th deadlock.

  3. After the above, debugging (F5) does not work anymore. It starts and ends without any errors. I have to restart Visual Studio in order to be able to Debug again.

DETAILS
I am using Visual Studio 2019 version 16.5.4 and PowerShellProTools 5.4.4.

image

  1. During Debug I sometimes navigate through the objects in order to check its contents, specially of the Properties. Since a few days ago, I cannot see the contents of any object. Everything is tagged or shown as System.String like below

  1. Below you will see some code being stepped through. I stopped it before executing the Showdialog() method. Then I stepped into it and no dialog window popped up. Nothing, I checked everywhere. I don’t have dual screens in here.

In order to break the deadlock, I had to kill the Visual Studio Powershell subtask

  1. After doing the above, I could not run Debug (F5) again. It just started and stopped immediately. How can this be traced?

Using VS Code instead

I had to finish my coding by using VS Code. This time I was able to expand the Objects, as well as having the Dialog displayed when debugging.

Please advise promptly how I can trace the above.

Adam,

I read post at https://github.com/ironmansoftware/poshtools-issues/issues/25 and also downgraded PSProTools from 5.4.4 to 5.3.6 and now Debugging shows the Objects as before, and the FolderDialog also displays well. I am going to leave it like that until you advise that 5.4.4 works fine.

I think you have to fix that 5.4 experimental console.

Adam,

I installed the latest version of the VSIX 5.4.6, however I still have a problem by finding the OpenFileDialog form that I detailed in the first thread. Navigating through the objects is fixed.

I am returning to v.5.3.6 because that one can display the form when debugging.

Please advise.