Significant debugger deficiencies

Archived support forum for customers who once purchased a PrimalForms product license. This forum is locked.
This topic is 12 years and 11 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
sysadmin267
Posts: 55
Last visit: Fri Jan 17, 2014 2:38 pm

Significant debugger deficiencies

Post by sysadmin267 »

I'm not sure where to begin, so I suppose I'll just kinda ramble off a few issues...Debugger/Runner doesn't have the option to run with arguments...which may be desired/needed at runtime.Script runtime variables are inconsistent between debug sessions and the 'Package Project' result. As one example, the variable $HostInvocation is valid when the project is packaged into the executable, but the variable is instead '$MyInvocation' during debug & running sessions.Example File: https://sites.google.com/site/outputred ... ects=0&d=1
User avatar
sysadmin267
Posts: 55
Last visit: Fri Jan 17, 2014 2:38 pm

Significant debugger deficiencies

Post by sysadmin267 »

An additional issue in the event that one needs to have a file in whatever directory the script happens to exist in, how are we to reference this during debugging???
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Significant debugger deficiencies

Post by davidc »

The Debugger only prompts for Parameters when a Param block is specified at the start of a ps1 script.

In your case you are working with a project and the $CommandLine only applies to the Packager. In the next service release I will allow you to use the DebugParameters comment (see blog link below) to pass the parameters to the project's Main function.

Please refer to the following blog on how to use debug parameters: http://www.sapien.com/blog/2011/03/22/f ... arguments/

Blog on MyInvocation variable information:
http://www.sapien.com/blog/2009/09/02/p ... nvocation/



Thank you,

David
David
SAPIEN Technologies, Inc.
User avatar
sysadmin267
Posts: 55
Last visit: Fri Jan 17, 2014 2:38 pm

Significant debugger deficiencies

Post by sysadmin267 »

Ah, Okay - the resolution for the myinvocation/hostinvocation is exactly what I've been up to, sorry I missed that post.As far as debug params go - I was surprised to have to put the # %DebugParameters%= yada yadaline in the Startup.pfs file instead of globals, as it seems that globals.ps1 gets executed first in the debugger, perhaps the forthcoming (I assume) documentation will make this more clear? See current build of project:https://sites.google.com/site/outputred ... ects=0&d=1
User avatar
sysadmin267
Posts: 55
Last visit: Fri Jan 17, 2014 2:38 pm

Significant debugger deficiencies

Post by sysadmin267 »

As for 'Getting the path of the current script' (or in this case project)...perhaps there is a larger issue here. It seems that invoking 'debug project' causes a .ps1 file to be 'compiled' (for lack of a more appropriate expression)in the user's temp directory.How is one to account for this (with debug params or otherwise) if one requires a data file in the folder of the project?
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Significant debugger deficiencies

Post by davidc »

This has already been addressed in the next service build. The 'compiled' script will be generated and executed in the same location as the project to ensure the paths remain the same.
David
SAPIEN Technologies, Inc.
User avatar
sysadmin267
Posts: 55
Last visit: Fri Jan 17, 2014 2:38 pm

Significant debugger deficiencies

Post by sysadmin267 »

Excellent news. Thank you. Just what should we call those composite 'compiled' scripts? Is there an official name?
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Significant debugger deficiencies

Post by davidc »

It has no official name yet, but compiled script seems fitting.

David
David
SAPIEN Technologies, Inc.
This topic is 12 years and 11 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.