2

vs code version:1.29.1(1.29.1)

python version:3.6.5


Launch.json:

     {
        "name": "Python",
        "type": "python",
        "pythonPath":"${config.python.pythonPath}", 
        "request": "launch",
        "stopOnEntry": true,
        "console": "none",
        "program": "${file}",
        "cwd": "${workspaceRoot}",
        "debugOptions": [
            "WaitOnAbnormalExit",
            "WaitOnNormalExit",
            "RedirectOutput"
        ],
        "env": {"name":"value"}
    }

workspacesettings:

     {
"python.pythonPath": "/usr/local/opt/python/libexec/bin/python",
"python.linting.pylintEnabled": true
     }

Extensions I downloaded.


When I test for debugging, I got failed.

result


It's said "You need to select a Python interpreter before you start debugging". But I actually choice one version shows in the lower left corner.

Any part is incorrect?

2 Answers 2

1

I edit as the code below and it works!!

{
"name": "Python: Current File (Integrated Terminal)",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"stopOnEntry": true
}
Sign up to request clarification or add additional context in comments.

Comments

0

The documentation that has been given here in the website of VS Code may be helpful. Did you try getting reference from here? https://code.visualstudio.com/docs/python/debugging

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.