You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having the ability to quickly run and/or debug an individual test has been absolutely fantastic and in the case of tests and benchmarks, this is very straightforward. It would be nice though if the run/debug could be customized in some way within examples/ (and I'm guessing bin/ too?) where the main function could reasonably expect command line arguments.
I'm not sure what might be the best way to approach this. I can see a two main options:
Adding 'Run with args' and 'Debug with args' to the list of possibilities. Four different run/debug options could become a big cluttered, but as this would not apply to most tests / benchmarks, I'm not sure this would be a big issue.
Adding a 'Customize' option which would create a pre-filled entry in launch.json allowing for the task to be run this way (and customized). Perhaps this could apply more generally?
The text was updated successfully, but these errors were encountered:
Yeah, this is something I very much want to have, but there's a large design space here. The upstream issue is tracked at microsoft/language-server-protocol#944 but, historically, waiting for the upstream (lsp/vscode) wasn't productive.
So perhaps it makes sense to just do it ourselves. I think this mostly requires coding the VS Code side of things. I think the missing pieces are:
adding a concept of ID to a run configuration, so that the editor can match run config returned by the server to persisted settings for this specific configuration
adding configuration persistance. They probably want to be saved in workspace configuration file (not sure about this)
adding templating/prototypical configuration. We should allow tweaking the arguments when running a partciualr test, together with tweaking default arguments when running any tests.
some UI affordances to move you from a #[test] function in the source code to the corresponding bit of JSON in the config.
2. Adding a 'Customize' option which would create a pre-filled entry in launch.json allowing for the task to be run this way (and customized). Perhaps this could apply more generally?
For Debug you can use "rust-analyzer.newDebugConfig" command ("Generate launch configuration" in UI). It works exactly like described: creates a new configuration in launch.json allowing to specify args, environment, etc.
Having the ability to quickly run and/or debug an individual test has been absolutely fantastic and in the case of tests and benchmarks, this is very straightforward. It would be nice though if the run/debug could be customized in some way within
examples/
(and I'm guessingbin/
too?) where the main function could reasonably expect command line arguments.I'm not sure what might be the best way to approach this. I can see a two main options:
launch.json
allowing for the task to be run this way (and customized). Perhaps this could apply more generally?The text was updated successfully, but these errors were encountered: