Page 1 of 1

PowerShell Studio 2016 Debugging Broken

Posted: Fri Jun 03, 2016 6:10 am
by david@koppy.com
Product, version and build: PowerShell Studio 2016 5.2.122
32 or 64 bit version of product: 64-bit
Operating system: Windows 10
32 or 64 bit OS: 64-bit
PowerShell Version: 5.0

Just upgraded from PSS2015 to PSS2016 and discovered that debugging is broken. Found another topic about people unable to create breakpoints after debugger is started. In my case, I can't get the debugger to break no matter when I create the breakpoint. The program just keeps running without stopping at breakpoints - or rather, it stops at the breakpoint but doesn't wait for the user to give a command. I can see this by the flashing on and off of the Debug options while the program runs. Am I missing something?

Re: PowerShell Studio 2016 Debugging Broken

Posted: Fri Jun 03, 2016 10:28 am
by DevinL
I'm unable to reproduce this on my end, can you upload a script that you're currently experiencing this with? You can upload it to your reply or if you don't wish for it to be public, you can upload it here: https://sapien.com/support/upload

Re: PowerShell Studio 2016 Debugging Broken

Posted: Fri Jun 03, 2016 1:23 pm
by DevinL
I received the files you uploaded and am still having difficulty reproducing this. Here are the various steps I took:

Attempt 1:
  1. Open the *.psm and *.ps1 file as individual files
  2. Place a breakpoint on line 48 of the *.ps1
  3. Begin debugging with F5
  4. Script stops and waits to continue at expected point
Attempt 2:
  • Create a new Module Project with your module file
  • Add the *.ps1 file to the project
  • Set the *.ps1 to be the startup script
  • Place breakpoint in same spot as previous and begin debugging
  • Script stops and waits to continue at expected point
If you could provide the steps you took to get to this point I would greatly appreciate it.

NOTE: To get the properties to appear as they are in the 2nd screenshot, you have to be in a project and select the root node in the project panel as in the 3rd screenshot.
Add_Existing_File.png
Add_Existing_File.png (47.17 KiB) Viewed 3895 times
Startup_Script.png
Startup_Script.png (11.54 KiB) Viewed 3895 times
Project_Root_Node.png
Project_Root_Node.png (9.8 KiB) Viewed 3895 times

Re: PowerShell Studio 2016 Debugging Broken

Posted: Mon Jun 06, 2016 6:22 am
by david@koppy.com
The file is the only file (script or otherwise) in a project with the same name. The problem happens in the file I uploaded but not in others. I created a new script that does nothing but open an Open File Dialog box. The breakpoint works fine in this file.

I don't do anything unusual when loading the problem file. My profile has three or four alias definitions in it but nothing that should cause this problem to occur.

I can upload the project file if it will help troubleshooting.

Re: PowerShell Studio 2016 Debugging Broken

Posted: Mon Jun 06, 2016 10:39 am
by DevinL
You refer to a single file, but the zip file you uploaded had two files in it, which one is it that's causing the problems?

If you could go ahead and upload the project file that'd be great, it could help me understand exactly what's going on.

Re: PowerShell Studio 2016 Debugging Broken

Posted: Tue Jun 07, 2016 10:19 am
by david@koppy.com
I have uploaded the project file. The module file is where several of the functions I used in the script reside. I included it in case you wanted to run the script.

I have also discovered that simple scripts will stop at breakpoints but that as the script gets longer, the debugger stops working properly. I don't have time to test it more right now, but as I discover more information, I'll post it here.

Re: PowerShell Studio 2016 Debugging Broken

Posted: Tue Jun 07, 2016 10:22 am
by DevinL
Thank you for the explanation. In that case I will try and reproduce this again later today and post if I find anything.

Re: PowerShell Studio 2016 Debugging Broken

Posted: Tue Jun 07, 2016 11:06 am
by david@koppy.com
I did some experimenting and discovered that if I load the script file alone without the project file, the debugger will stop at breakpoints. It's only when I load the project with the file as a member that the issue occurs.

Re: PowerShell Studio 2016 Debugging Broken

Posted: Tue Jun 07, 2016 3:03 pm
by DevinL
I've managed to recreate this on my end and have alerted the developers. As soon as I have some more information I'll be sure to let you know.

Thank you for bringing this to our attention.

Re: PowerShell Studio 2016 Debugging Broken

Posted: Thu Jun 16, 2016 8:49 am
by davidc
Please try the latest build of PowerShell Studio (v5.2.123).

David