Page 1 of 1

Recover from crash

Posted: Thu Apr 09, 2020 5:22 am
by Reddrgn2
Product, version and build:
64 b - primalscript 2020 - version 7.7.139
Operating system:
64 bit OS: win 10 enterprise


Question - does primal script have option to recovery from crash? By that I mean when working on creating a script and the computer crashes or freezes or just dies and you didn't save it yet. Can the tab/ps1 script be recovered in primal script? I know with ISE if it crashes it will recovery it the next time you open ISE.

Before people tell me I should save it when first starting to work on something or enable logging, I already do both. I save every 2 mins and have logging enabled when first starting. This is more random thought and I had to force reboot pc, again everything is saved and logged but I kind of like when ISE recovers those force closed tabs/ps1's.

Re: Recover from crash

Posted: Thu Apr 09, 2020 8:57 am
by Alexander Riedel
If you have the option turned on, say you open a file called
myscript.ps1
As soon as you start modifying it, a file called myscript.temppoint.ps1 will appear.
It will go away when you close the file normally.

You can at any right point click on the document tab and select "Restore points -> Rewind to beginning of session" to undo everything since you opened the file, regardless of how often you saved.
In case of a system crash, you'd still find that file and could use it to restore a corrupted file.

At the moment though there is no automatic crash protection temporary save.
It is on our list of things to add, as PowerShell Studio already has a mechanism for that.

Re: Recover from crash

Posted: Thu Apr 09, 2020 9:07 am
by Reddrgn2
Yes, I am able to see temp points but one of those things ISE does that would nice to have. Studio and SQL have it, which was little surprised script didn't. I just wanted to make sure I didn't miss something I needed to turn/check. Thanks