Debug mode doesn't work with long script

Support for all customers who have purchased a SAPIEN PowerShell Studio product license. This forum does not offer a response time guarantee.
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.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
regismartel
Posts: 6
Joined: Tue Jan 23, 2018 10:44 am

Debug mode doesn't work with long script

Post by regismartel » Mon Feb 18, 2019 12:26 pm

To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build: Powershell Studio 2019 5.6.158
32 or 64 bit version of product: 64-bit
Operating system: Windows 8.1 Pro (I know...)
32 or 64 bit OS: 64-bit

*** Please add details and screenshots as needed below. ***

DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM

Hi,

I have a fairly long script (2000+ lines) that I keep improving but since a few days I can't use breakpoints and perform traces anymore. The script just seems to never reach the breakpoints if it executes at all. There is no error messages and being patient is of no use: it looks like Powershell Studio is frozen until I click the Stop button. However I can use MS ISE to set breakpoints on the same lines in the same script and perform traces without problem.

User avatar
mxtrinidad
Site Admin
Posts: 294
Joined: Sun Mar 03, 2013 12:42 pm

Re: Debug mode doesn't work with long script

Post by mxtrinidad » Tue Feb 19, 2019 7:00 am

We notice you on version 5.6.158.

Please upgrade to the latest version 5.6.159, and see if you get the same issue.
Let us know as soon as possible.

User avatar
regismartel
Posts: 6
Joined: Tue Jan 23, 2018 10:44 am

Re: Debug mode doesn't work with long script

Post by regismartel » Tue Feb 19, 2019 8:01 am

I updated to the latest version and I have a similar problem.

I noticed that when I reach a first breakpoint and I want to look at the content of a variable in the Debug console tab it doesn't work and the Variables tab shows an hourglass (well, the Windows 10 equivalent). The "hourglass" even persists after I have stopped execution.

User avatar
Olga_B
Site Admin
Posts: 102
Joined: Mon May 15, 2017 9:06 am

Re: Debug mode doesn't work with long script

Post by Olga_B » Tue Feb 19, 2019 8:35 am

If you can, please zip and load up the original file, so that we can attempt to recreate the issue:

https://www.sapien.com/support/upload

User avatar
regismartel
Posts: 6
Joined: Tue Jan 23, 2018 10:44 am

Re: Debug mode doesn't work with long script

Post by regismartel » Tue Feb 19, 2019 1:35 pm

I would be of no use: the script interacts with Excel, a Sharepoint site and a back-end SQL database.

We could meet for a screen-sharing session if you want.

User avatar
Olga_B
Site Admin
Posts: 102
Joined: Mon May 15, 2017 9:06 am

Re: Debug mode doesn't work with long script

Post by Olga_B » Tue Feb 19, 2019 2:29 pm

Screen-sharing will not help

Have you updated PowerShell Studio to 5.6.159?
Can you connect to the database from PowerShell Studio?
Could you do the test: Install PrimalScript and try to run same script with PrimalScript.

User avatar
regismartel
Posts: 6
Joined: Tue Jan 23, 2018 10:44 am

Re: Debug mode doesn't work with long script

Post by regismartel » Wed Feb 20, 2019 9:05 am

Have you updated PowerShell Studio to 5.6.159?

Yes I did two days ago and it didn't help.

Can you connect to the database from PowerShell Studio?

Yes without problem.

Could you do the test: Install PrimalScript and try to run same script with PrimalScript.

Just made this test. Wasn't able to debug using PrimalScript either. At one point, F10 / F11 just stopped working while PrimalScript itself was still responsive.

User avatar
Olga_B
Site Admin
Posts: 102
Joined: Mon May 15, 2017 9:06 am

Re: Debug mode doesn't work with long script

Post by Olga_B » Wed Feb 20, 2019 9:32 am

Thanks for running that test.
Do you see this issue only with long script or simple script behave the same?
Is the database on remote computer?
Was it working before with older PowerShell Studio version
If you set breakpoint in the beginning of script or before any database, excel, sharepoint site does debugger work?