Xamarin: How do I pass commandline parameter when debugging? - xamarin

Using Xamarin 4.2.3(60), I want to debug a .NET app that takes command line args, I have tried setting the projects General parameters , eg, "/p /Users/Tester/Automation", but when I run in the debugger the Mina method string[] args is null? I have also tried setting the "Run With -> Custom Parameters by editing the Default setting the Arguments = "/p /Users/Tester/Automation" and Working dir to "/Users/Tester/Automation", but when I then "Run with" and choose the saved Custom mode, the program still does not appear to have been passed the arguments?
Anyone know how to run the debugger and pass command line args to the program being debugged?

You can add command line arguments via the Parameters field within Project Properties -> Run -> General.
EG:

Related

Passing named arguments in launch.json

I am trying to pass named arguments to launch.json as program arguments in VSCode.
--myArgument=My Argument Value
So that I can catch this named property in Spring Boot as an external property.
I have tried the "args" key but this passes them to the main function.
Is there a way to achieve this in the VSCode Java Debugger?

How can I get command line arguments in a Qt Installer Framework script?

I am writing a Qt Installer Framework script, and I would like to allow the user to launch the installer with arguments and then apply those arguments in various ways. For example, a switch to auto accept the EULA, a means to directly pass the target directory, a list of the components to be installed, etc.
The syntax to pass arguments to QIFW installer is Key=Value.
You can provide command line argument like below
YouInstaller.exe Arg1=true
Then you can get this value in Component or Controller script as below
var Arg1 = installer.value('Arg1')
installer QML Type
Controller Script

Use VS envirenment-variables as command-line args

I can use envireonment-variables such as $(TargetFileName) in my pre- and post-build-events. What I want to do is apply those variables to the command-line args of an external program (in my case nunit). So whenever my app starts I want to start another one with the file-name of the first as arg.
Is this possible?
When debugging my project the nunit-windows appears but shows an error-message that the given assembly $(OutDir)$(TargetFileName)$(TargetExt) could not be found. I suppose that the variables are only available during build but not during run so it seems I have to hardcode the parameters to the command-line args. Is this true?

VB6 Debugger - Command line arguements

In the VB6 IDE there is a window were you can specify command line arguements (for debugging). If you create a .exe with arguements specified, will they be published with the application? I don't believe they will.
No, they will not. This is just for testing your application if it uses command line arguments. It allows you to specify your command line arguments and step through exactly like if the program was called with those command line arguments.
For example, you normally pass parameters by simply calling your EXE and providing the parameters at the same time. So, if you normally call your program like such
C:\test.exe /test /inet /copy
You would simply set the command-line arguments to
/test /inet /copy
in the VB6 IDE

passing command line arguments (NSArgumentDomain) to program under Xcode

I'd like to be able to pass command line arguments to programs that are run/debugged under Xcode. I want to do this so that I can command-line enable debug modes using Cocoa's NSUserDefaults and NSArgumentDomain.
How to do that?
Thanks!
Xcode 4
Command line arguments can be set in schemes in Xcode 4. In the scheme editing window, the list of possible actions, such as Build, Run and Test are displayed on the left hand side. Select the Run action for the scheme you are setting the command line arguments for, then add the argument(s) in the 'Arguments Passed On Launch' section.
Pre-Xcode 4
In the left-hand sidebar, expand the Executables section, then right-click the executable you want to have arguments and hit Get Info. Go to the Arguments tab - it has two sections you can use:
Arguments, for command-line arguments you want sent to your program
Environment, for variables you want set in the environment before your program launches

Resources