xmake-io / xmake-vscode

🍩 A XMake integration in Visual Studio Code
https://xmake.io
Apache License 2.0
228 stars 55 forks source link

Can't input run arguments to the project with VS Code extension #190

Open lewisl opened 1 year ago

lewisl commented 1 year ago

Is your feature request related to a problem? Please describe.

Want to use the run command for a binary target. Need to supply the command line arguments. In my case, a single int. No way to do it.

Describe the solution you'd like

Should be an input to the BuildRun and Run commands in the extension.

Describe alternatives you've considered

Well, I try using the command line approach from within VS Code. Certainly will work after I figure out how to do it in xmake commandline api.

Additional context

Sadly, a very large repertoire (but not ALL) of the things we can do from the command line need to be supported in the extension. It is sort of ad hoc to figure out which commands and arguments are needed.

waruqi commented 1 year ago

see https://github.com/xmake-io/xmake-vscode/blob/0f69b477af12d3e8cc6ac197aae80dc053271ddd/package.json#L675

lewisl commented 1 year ago

Not sure what I am supposed to see there.

Using the commandline is easy-peasy: xmake r [target] [args]

This is pretty low priority feature request. Probably take some time to think about what makes the vs code extension both convenient and worthwhile to use. I feel your pain that having to duplicate your commandline interface for every IDE you choose to support (and you are good about aiming for a lot of them) is a bit of pain when most modern IDEs have reasonable terminal support. Here's a suggestion: just create a very open ended command that opens the default terminal (or uses one that's already open) and simply passes: xmake [task] [options] [project] [extra_args]. Maybe this isn't much of a plus but it enables some people to just live in their IDE. And then you are done. Then, only directly implement the commands that are a little bit more complicated and more involved.

waruqi commented 1 year ago
image image

or use set_runargs https://xmake.io/#/manual/project_target?id=targetset_runargs