Significant debugger deficiencies

Archived support forum for customers who once purchased a PrimalForms product license. This forum is locked.
User avatar
sysadmin267
Posts: 55
Joined: Tue Mar 03, 2009 2:03 am

Significant debugger deficiencies

Post by sysadmin267 » Wed Apr 20, 2011 9:21 am

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
Joined: Tue Mar 03, 2009 2:03 am

Significant debugger deficiencies

Post by sysadmin267 » Wed Apr 20, 2011 10:21 am

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
Joined: Thu Aug 18, 2011 4:56 am

Significant debugger deficiencies

Post by davidc » Wed Apr 20, 2011 10:34 am

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
Joined: Tue Mar 03, 2009 2:03 am

Significant debugger deficiencies

Post by sysadmin267 » Thu Apr 21, 2011 3:20 am

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
Joined: Tue Mar 03, 2009 2:03 am

Significant debugger deficiencies

Post by sysadmin267 » Thu Apr 21, 2011 3:26 am

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
Joined: Thu Aug 18, 2011 4:56 am

Significant debugger deficiencies

Post by davidc » Thu Apr 21, 2011 4:23 am

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
Joined: Tue Mar 03, 2009 2:03 am

Significant debugger deficiencies

Post by sysadmin267 » Thu Apr 21, 2011 4:25 am

Excellent news. Thank you. Just what should we call those composite 'compiled' scripts? Is there an official name?

User avatar
davidc
Posts: 5913
Joined: Thu Aug 18, 2011 4:56 am

Significant debugger deficiencies

Post by davidc » Thu Apr 21, 2011 4:56 am

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

David
David
SAPIEN Technologies, Inc.