Debug mode doesn't work with long script

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 5 years and 1 month 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
regismartel
Posts: 6
Last visit: Wed Sep 15, 2021 10:21 am

Debug mode doesn't work with long script

Post by regismartel »

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
Posts: 399
Last visit: Tue May 16, 2023 6:52 am

Re: Debug mode doesn't work with long script

Post by mxtrinidad »

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
Last visit: Wed Sep 15, 2021 10:21 am

Re: Debug mode doesn't work with long script

Post by regismartel »

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: 196
Last visit: Thu Mar 28, 2024 8:34 am

Re: Debug mode doesn't work with long script

Post by Olga_B »

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
Last visit: Wed Sep 15, 2021 10:21 am

Re: Debug mode doesn't work with long script

Post by regismartel »

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: 196
Last visit: Thu Mar 28, 2024 8:34 am

Re: Debug mode doesn't work with long script

Post by Olga_B »

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
Last visit: Wed Sep 15, 2021 10:21 am

Re: Debug mode doesn't work with long script

Post by regismartel »

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: 196
Last visit: Thu Mar 28, 2024 8:34 am

Re: Debug mode doesn't work with long script

Post by Olga_B »

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?
This topic is 5 years and 1 month 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.