Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make "args": "${command:pickArgs}" as default debug configuration #497

Closed
PRO-2684 opened this issue Nov 5, 2024 · 5 comments
Closed

Make "args": "${command:pickArgs}" as default debug configuration #497

PRO-2684 opened this issue Nov 5, 2024 · 5 comments
Assignees
Labels
feature-request Request for new features or functionality needs community feedback triage-needed Needs assignment to the proper sub-team

Comments

@PRO-2684
Copy link

PRO-2684 commented Nov 5, 2024

Originally posted at vscode/issues#225834

I was really frustrated when I "debug Python files with arguments", input my space-separated argument list, and see my script treating it like a single argument. So I think it is more sensible to make "args": "${command:pickArgs}" as default, instead of "args": ["${command:pickArgs}"]. More specifically, I suggest changing the default debug configuration:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python Debugger: Python File",
            "type": "debugpy",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "args": [
                "${command:pickArgs}"
            ]
        }
    ]
}

to:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python Debugger: Python File",
            "type": "debugpy",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "args": "${command:pickArgs}"
        }
    ]
}
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Nov 5, 2024
@eleanorjboyd eleanorjboyd added needs community feedback feature-request Request for new features or functionality labels Dec 10, 2024
@TCPsoftware
Copy link
Contributor

I found this problem as well. Removing the [ ] does make it work properly.

@TCPsoftware
Copy link
Contributor

I use the argparse library to parse command line parameters, but if there is [ ], the passed parameters will be wrapped in single quotes ' ', which will cause argparse parsing errors (because it is a single parameter). Only by removing [ ] can the passed parameters be turned into independent multiple parameters and run correctly.

@eleanorjboyd
Copy link
Member

Thank you for submitting your feature request and everyone who considered it! Unfortunately, this issue did not receive enough votes over the allotted time, and so we are closing the issue. PRs are welcome so you can create a PR that fixes this if you are passionate about getting this feature across the finish line. Thanks!

@eleanorjboyd eleanorjboyd closed this as not planned Won't fix, can't repro, duplicate, stale Jan 7, 2025
@stoune
Copy link

stoune commented Feb 25, 2025

Existing implementation is a mess.
I couldn't understand why it should be even voted, this kinds of "invisible" feaures which immidiatelly boost your experience.
If I use cli I just supply args as a single sting, if use a debugger I have to prepare special string with each arg quoted.
There is no sensible defaults.
And I have to guess, why I get an error and how it should work.
That's a terrible.

@eleanorjboyd
Copy link
Member

Hi @stoune, sorry the experience is not working well for you. Could you provide the arg string you are currently entering here or an example of it? Also have you tried no-config debugging? Could this potentially help in your case? Here is the wiki page about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality needs community feedback triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

4 participants