PowerShell Studio 2016 Debugging Broken

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION 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.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 7 years and 9 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
david@koppy.com
Posts: 20
Last visit: Fri Jan 11, 2019 8:21 am

PowerShell Studio 2016 Debugging Broken

Post 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?
DevinL
Posts: 1098
Last visit: Tue Jun 06, 2017 9:15 am

Re: PowerShell Studio 2016 Debugging Broken

Post 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
DevinL
SAPIEN Technologies, Inc.
DevinL
Posts: 1098
Last visit: Tue Jun 06, 2017 9:15 am

Re: PowerShell Studio 2016 Debugging Broken

Post 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 5516 times
Startup_Script.png
Startup_Script.png (11.54 KiB) Viewed 5516 times
Project_Root_Node.png
Project_Root_Node.png (9.8 KiB) Viewed 5516 times
DevinL
SAPIEN Technologies, Inc.
User avatar
david@koppy.com
Posts: 20
Last visit: Fri Jan 11, 2019 8:21 am

Re: PowerShell Studio 2016 Debugging Broken

Post 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.
DevinL
Posts: 1098
Last visit: Tue Jun 06, 2017 9:15 am

Re: PowerShell Studio 2016 Debugging Broken

Post 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.
DevinL
SAPIEN Technologies, Inc.
User avatar
david@koppy.com
Posts: 20
Last visit: Fri Jan 11, 2019 8:21 am

Re: PowerShell Studio 2016 Debugging Broken

Post 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.
DevinL
Posts: 1098
Last visit: Tue Jun 06, 2017 9:15 am

Re: PowerShell Studio 2016 Debugging Broken

Post 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.
DevinL
SAPIEN Technologies, Inc.
User avatar
david@koppy.com
Posts: 20
Last visit: Fri Jan 11, 2019 8:21 am

Re: PowerShell Studio 2016 Debugging Broken

Post 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.
DevinL
Posts: 1098
Last visit: Tue Jun 06, 2017 9:15 am

Re: PowerShell Studio 2016 Debugging Broken

Post 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.
DevinL
SAPIEN Technologies, Inc.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: PowerShell Studio 2016 Debugging Broken

Post by davidc »

Please try the latest build of PowerShell Studio (v5.2.123).

David
David
SAPIEN Technologies, Inc.
This topic is 7 years and 9 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.