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

Feature Suggestion: add python interpreter args to launch configuration #75

Closed
DonJayamanne opened this issue Nov 13, 2017 · 5 comments
Closed
Labels
area-debugging feature-request Request for new features or functionality good first issue

Comments

@DonJayamanne
Copy link

From @bsphere on January 29, 2017 22:6

This is very useful for debugging pyspark programs and adds the ability to add spark-submit args such as "--packages" and "--master"

Copied from original issue: DonJayamanne/pythonVSCode#682

@DonJayamanne
Copy link
Author

You can add custom arguments to the python interpreter when debugging as follows:

{
    "name": "Python",
    "type": "python",
    "request": "launch",
    "stopOnEntry": true,
    "pythonPath": "config.python.pythonPath",
    "args": [
        "--packages", 
        "--master"
    ],
    "program": "file",
    "cwd": "workspaceRoot",
    "debugOptions": [
        "WaitOnAbnormalExit",
        "WaitOnNormalExit",
        "RedirectOutput"
    ]
},

@DonJayamanne
Copy link
Author

From @bsphere on February 2, 2017 11:36

@DonJayamanne those are args to the python program and not for the python interpreter,
e.g. spark-submit --packages ....jar --conf spark.something.something=something program.py arg1

@brettcannon brettcannon added awaiting 1-decision feature-request Request for new features or functionality labels Nov 14, 2017
@mcdevitts
Copy link

Would adding this ability also allow for keeping the console open after the file / program has been run through the "-i" option? Having the ability whether in the debugger or in the "Run Python File in Terminal" option to keep the terminal open for inspection would be really handy.

@ali-alidoust
Copy link

I needed to add -X:PrivateBinding arg to IronPython interpreter,but as a temporary workaround I created a batch/shell script like the following and added the arg there:

 @echo off
 "C:\Program Files\IronPython 2.7\ipy.exe" -X:PrivateBinding %*

then in the launch.json file I set pythonPath variable to my batch file:

{
  ...
  "pythonPath": "${workspaceFolder}/ipy.bat",
  ...
}

@brettcannon
Copy link
Member

To help manage our issues and to better communicate what the team plans to work on we are closing issues that we don't plan to work on but would accept a pull request from a volunteer for. To be clear, closing this issue does not mean we won't consider a pull request for this enhancement as outlined in our contributing guide, just that the development team has no plans to work on it themselves.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-debugging feature-request Request for new features or functionality good first issue
Projects
None yet
Development

No branches or pull requests

4 participants