PS Studio 5.4.145: Form Project - Breakpoints are ending with "Script Ended"

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 6 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
Jehoschua
Posts: 64
Last visit: Fri Mar 01, 2024 3:24 am

PS Studio 5.4.145: Form Project - Breakpoints are ending with "Script Ended"

Post by Jehoschua »

Hello

Since today, PowerShell Studio 2017 behaves strange in Forms projects (simple scripts can still be debugged without any issues):
  • My test project is simple:
    I just create a new Form Project and select "Empty Form" and use this automatically created code in the following steps
  • If I delete all breakpoints and then start the project using F5 Debug, then the Projects Form is displayed.
    If I then add a breakpoint and then try to get the debugger to stop at this breakpoint, then the Application just ends with ">> Script Ended"
  • If I add a breakpoint before I start the Debugger, then I can not use the Debugger at all: the application just starts and ends:
    >> Debugging (Test-Form.psproj) Project Script...
    >> Platform: V5 64Bit (STA) (Elevated) (Forced)
    >> Script Ended
I have those additional informations:
  • Windows 10, Version 1607
  • PSVersion: 5.1.14393.1480
  • To be sure the installation is OK, I have reinstalled PowerShell Studio 2017 v5.4.145. Still the same problem.
Do you know this kind of problem?

Thanks a lot for any help,
kind regards,
Thomas
Schittli
User avatar
mxtrinidad
Posts: 399
Last visit: Tue May 16, 2023 6:52 am

Re: PS Studio 5.4.145: Form Project - Breakpoints are ending with "Script Ended"

Post by mxtrinidad »

Let us take a look at it and get back to you soon.

Thanks
User avatar
mxtrinidad
Posts: 399
Last visit: Tue May 16, 2023 6:52 am

Re: PS Studio 5.4.145: Form Project - Breakpoints are ending with "Script Ended"

Post by mxtrinidad »

Can you please attached a sample form with the code that's causing this symptoms.
I can't duplicate the behavior and everything looks OK.
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: PS Studio 5.4.145: Form Project - Breakpoints are ending with "Script Ended"

Post by Alexander Riedel »

Topic moved by moderator. Please make sure to post in the correct forum with the version information requested.
The "Customer Service" forum is not meant for any technical problems with a product. Please use the applicable product forum to report any such issues or ask question regarding the product you are inquiring about.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
Jehoschua
Posts: 64
Last visit: Fri Mar 01, 2024 3:24 am

Re: PS Studio 5.4.145: Form Project - Breakpoints are ending with "Script Ended"

Post by Jehoschua »

System Settings:
  • Windows 10 Enterprise, 1709, OS Buid 16299.15, 64bit
  • PowerShell Studio 2017 v5.4.145

Good afternoon

Finally, I was able to create a simple forms project using PowerShell Studio, which does not work as soon as I enable a brackpoint.
I've added a zip file of my project. I've created this project using PowerShell Studio:
  • File » New Project
  • » Form Project
  • » Empty Form
Then:
  • 1st, I just start the new project using F5 (Debug) - everything is OK.
  • 2nd, I just set a breakpoint on the well-known line:
    if((Show-MainForm_psf) -eq 'OK')
If I start the Debugger using F5 (Debug), the Project starts and immediately ends, therefore, the Debugger does not wait on the breakpoint:
>> Debugging (test.psproj) Project Script...
>> Building (test) Project...
>> Merging 'Startup.pss' ...
>> Merging 'Globals.ps1' ...
>> Merging 'MainForm.psf' ...
>> Writing 'test.Run.ps1' ...
>> Platform: V5 64Bit (STA) (Elevated) (Forced)
>> Script Ended

Thanks a lot for any help,
kind regards,
Thomas
Schittli
Attachments
Test.zip
(15.88 KiB) Downloaded 134 times
User avatar
mxtrinidad
Posts: 399
Last visit: Tue May 16, 2023 6:52 am

Re: PS Studio 5.4.145: Form Project - Breakpoints are ending with "Script Ended"

Post by mxtrinidad »

I got the environment:
Microsoft Windows [Version 10.0.16299.192]
SAPIEN PowerShell Studio Version 5.4.145

Follow the steps provided to repo the issue, but I still can't make it bomb.

Image
Attachments
PSS2017_145_Debug_2018-01-30_8-56-10.jpg
PSS2017_145_Debug_2018-01-30_8-56-10.jpg (314.59 KiB) Viewed 4617 times
User avatar
Jehoschua
Posts: 64
Last visit: Fri Mar 01, 2024 3:24 am

Re: PS Studio 5.4.145: Form Project - Breakpoints are ending with "Script Ended"

Post by Jehoschua »

Good evening mxtrinidad

Thank you very much for testing our problem!,
we've updated Windows 10 to the identical version you have used, but the problem still exists.

Because we've already uninstalled and reinstalled PowerShell Studio, I think it will be hard to find the bug.
Therefore we use this workaround: PowerShell Studio is the Forms designer and Visual Studio Code is the debugger (which has no problems to handle breakpoints).

At least, we can go on with this project.

Kind regards,
Thomas
User avatar
mxtrinidad
Posts: 399
Last visit: Tue May 16, 2023 6:52 am

Re: PS Studio 5.4.145: Form Project - Breakpoints are ending with "Script Ended"

Post by mxtrinidad »

Hum!! Apologies for not asking this before...: Does it happens on all new projects? Also, Are these project been created in the user SAPIEN folders?
Or, are they been stored on a different (network) folder?

Wondering, if there are any issues with the UAC, or any security settings.

It's hard to catch indeed!
User avatar
mxtrinidad
Posts: 399
Last visit: Tue May 16, 2023 6:52 am

Re: PS Studio 5.4.145: Form Project - Breakpoints are ending with "Script Ended"

Post by mxtrinidad »

One of my college just mention that this could be a sign of project corruption. He suggested to "... Deleting all build and run files from a project can sometimes fix this. ...".

Also, there's no need to run debugger elevated.

Give it one more try and let us know if the error persist.
:)
User avatar
Jehoschua
Posts: 64
Last visit: Fri Mar 01, 2024 3:24 am

Re: PS Studio 5.4.145: Form Project - Breakpoints are ending with "Script Ended"

Post by Jehoschua »

Good evening mxtrinidad

Thank you very much for studying and discussing this problem!, your questions lead me to the solution:

In the real life, the project is in a subdirectory containing an equal sign (=):
c:\Scripts\PowerShell\=GUI\Edit-Json-MA\Edit-Json-MA.psproj

If there is an equal sign in the script path, PowerShell gets in trouble because PowerShell stops working as expected.
I've created a Bug report: https://github.com/PowerShell/PowerShell/issues/6087

Therefore, PowerShell Studio is working perfectly... :-)

Thanks a lot for your help!
kind regards,
Thomas
This topic is 6 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.