I use PowerGUI to edit my script. In Visual Studio, I can add command line argument from project properties. However, I cannot find a way to set parameters to the UI to debug my codes with specified $args.
For example, I set one debug point in PowerGUI, first line of my start code. Then I try to start my script from UI's panel "PowerShell Console" with some parameters(which is one way I guess I can pass my parameters to run my scripts). The script runs without stopping in my debug points. Any way available in PowerGUI?
OK. I think I find a way to pass parameters to my script and debug in PowerGUI. It is not visible from menu items. However, if you click on customize toolbar, you will find out one from "ScriptsParameterCommand" command. You just drag it to the toolbar.
Then type in any parameters in the "input script parameters here" toolbar icon, a text box. Type in parameters. Finally press enter key. I run my script in debug mode and it does stop at the debug points!
Actually, I got this help from this article: Features of PowerGUI Script Editor