-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Update launch.json schema to add "code" #12500
Comments
We don't see how this would map back to the editor in order to do something useful. Plus, these hasn't been any upvotes. |
FWIW the use case for this is to provide custom startup path for cases where "program" or "module" are inadequate (e.g. import a module and then run some function from it with specified arguments). I'm not sure what you mean by "mapping back to the editor"? The code is not viewable in the editor is a separate file that can be debugged, but for 2-3 lines of code this is supposed to be used with, it's not really a concern. |
How it ties into VS Code's UI/UX. |
In addition to "program" and "module", debugpy also supports "code". This maps to Python command line as follows:
python
...foo.py
: "program"-m foo
: "module"-c print(123)
: "code"The value can be a single string:
Or it can be an array of strings, in which case each string is treated as a separate line of code (i.e. they're joined together using
\n
):The text was updated successfully, but these errors were encountered: