How would I go about creating a chat command with arguments?
For now im using, a separate trigger for every debug command. And my god there is alot of them to make sure everything is working as it should be. I notice I am spending more and more time doing this when I could be doing something like.
-Debug time x
which would set the time of a variable to any integer that I put in the chat command.
Thanks to the string natives available in SC2 making string parsers is easier than ever.
For word based commands you can iterate through the string word by word processing as required. In your case "-debug" would be the partially matched event word and then the second word of the string would be put through multiple selection to determine the command to perform. The third, or however many word is then processed as an argument for that command.
I literally threw together a debug system like that for Undead Assault 3 in a couple of minutes. Of course I disabled it for online play so no one could ever be tempted to cheat, not even myself.