Significant debugger deficiencies
- sysadmin267
- Posts: 55
- Last visit: Fri Jan 17, 2014 2:38 pm
Significant debugger deficiencies
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
- sysadmin267
- Posts: 55
- Last visit: Fri Jan 17, 2014 2:38 pm
Significant debugger deficiencies
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???
Significant debugger deficiencies
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
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.
SAPIEN Technologies, Inc.
- sysadmin267
- Posts: 55
- Last visit: Fri Jan 17, 2014 2:38 pm
Significant debugger deficiencies
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
- sysadmin267
- Posts: 55
- Last visit: Fri Jan 17, 2014 2:38 pm
Significant debugger deficiencies
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?
Significant debugger deficiencies
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.
SAPIEN Technologies, Inc.
- sysadmin267
- Posts: 55
- Last visit: Fri Jan 17, 2014 2:38 pm
Significant debugger deficiencies
Excellent news. Thank you. Just what should we call those composite 'compiled' scripts? Is there an official name?
Significant debugger deficiencies
It has no official name yet, but compiled script seems fitting.
David
David
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.