Add prompt for arguments when launching debugger
See original GitHub issueWith the java extension for VS Code, when editing launch parameters, you can set args
to be "${command:SpecifyProgramArgs}"
which will prompt for arguments.
A similar feature for Python would have been most appreciated.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:35
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Prompt for specifying arguments when launching debugger
In the Java extension for VS Code, when editing launch parameters, you can set args to be "${command:SpecifyProgramArgs}" which will prompt for ......
Read more >VS Code debugging prompting for arguments and also setting ...
I know how to pass fixed arguments in the launch.json, e.g. In Visual Studio Code, how to pass arguments in launch.json .
Read more >Debugging in Visual Studio Code
To run or debug a simple app in VS Code, select Run and Debug on the Debug start view or press F5 and...
Read more >Add Program Arguments and Environment Variables - JetBrains
Type the arguments in the Program arguments field. The arguments should be separated with spaces.
Read more >How to set-up command line arguments in Microsoft Visual ...
This works when you press F5 to run the code or start a debug session. Alternative to command line arguments. Above I have...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This would be very useful if implemented. While we can already use a
promptString
input inlaunch.json
to allow user input toargs
when debugging, this is limited to a single argument (as theargs
value is a list of strings, not one long string, and variable substitution only works within strings).There has been discussion about this in various places (cpp-tools, js-debug, and vscode itself), and the straightforward solution has been to introduce a new parameter for the debugger in
launch.json
:argsString
. This has been successfully implemented by bash-debug in this PR. The upshot is the content ofargsString
is parsed by shell-quote, and the resulting array of strings is appended to the normalargs
parameter.This would allow users to use a VSCode
promptstring
input to allow arbitrary command arguments during debug (which would be really useful!) with something like:launch.json
:Not from the team but I stumbled across this and with this snippet:
It is possible to obtain multiple parameters split as you type them
VsCode Version: 1.73.1 Python extension Version: v2022.18.2