Many of the scripts you develop use command line arguments to specify data that needs to be passed to the script. In a production environment these parameters usually change for each invocation of a script.
For debugging however most developers use a fixed set of test parameters for any given script, which allows you to easily reproduce the state you need for debugging a specific item.
In the past that meant that for each script you had to manually set the parameters somewhere in a dialog box before debugging. It also meant that you somehow had to remember what the necessary parameters for a script where. If you are anything like me, that means a lot of Post-It notes on your desk.
In PrimalScript 2011 you can store the debug parameters for each script within the script itself. Simply add a comment somewhere.
# %DebugArguments%="Kick the tires and light the fires"
or in VBScript
‘ %DebugArguments%="That’s a negative, Ghost Rider"
The quotes are there to make this ONE single parameter, of course you can specify multiple parameters as well:
%DebugArguments%=Servername Username password
Anytime you press that debug button now these parameters get passed to your script. No more Post-It notes, no more remembering what the parameters are.
(PowerShell debugger with preset arguments)
(VBScript debugger with preset arguments)