Skip to content

Configured debug type 'python' is installed but not supported in this environment. #17952

Closed

Description

VS Code version

1.62.0

Extension version

v2021.11.1422169775

OS type

Linux

OS version

Linux x64 5.11.0-38-generic snap

Python distribution

Anaconda

Python version

3.8.10

Language server

Default

Expected behaviour

Disappear warning message:
Configured debug type 'python' is installed but not supported in this environment.

Actual behaviour

Steps to reproduce

  1. Installing exention on vscode (https://marketplace.visualstudio.com/items?itemName=ms-python.python)
  2. Create hello.py with simple code;
    print("hello")
  3. Create launch.json with content:
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Current File (Integrated Terminal)",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "cwd": "${fileDirname}"
        }
    ]
}
  1. Open Problem tab on panel, we will see:
    Configured debug type 'python' is installed but not supported in this environment.

Logs

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added
    bugIssue identified by VS Code Team member as probable bug
    triage-neededNeeds assignment to the proper sub-team
    on Nov 7, 2021
  2. ZeningLin commented on Nov 8, 2021

    @ZeningLin

    Same problem on windows + Anaconda. Debug works when using the top-right 'debug' button, fails in debug panel using launch.json file

  3. kimadeline commented on Nov 9, 2021

    @kimadeline

    Hi lutuantai95 (@lutuantai95) and Zening Lin (@ZeningLin), thank you for reaching out.

    I can reproduce the issue with 2021.12.1436712109-dev, although you can ignore the warning for now, it is still possible to debug your Python file despite the warning.

    Do you get any warnings about shell resolution when you start VS Code?


    The issue seems to come from this line

    "when": "!virtualWorkspace && shellExecutionSupported"

    If I remove the && shellExecutionSupported part (introduced in #17812) the warning doesn't appear.

  4. ZeningLin commented on Nov 9, 2021

    @ZeningLin

    Hi lutuantai95 (@lutuantai95) and Zening Lin (@ZeningLin), thank you for reaching out.

    I can reproduce the issue with 2021.12.1436712109-dev, although you can ignore the warning for now, it is still possible to debug your Python file despite the warning.

    Do you get any warnings about shell resolution when you start VS Code?

    The issue seems to come from this line

    "when": "!virtualWorkspace && shellExecutionSupported"

    If I remove the && shellExecutionSupported part (introduced in #17812) the warning doesn't appear.

    No shell resolution warnings found in my case. Debug works after python plug-in reinstallation although the warning is still there.

  5. kimadeline commented on Nov 9, 2021

    @kimadeline

    Filed upstream: microsoft/vscode#136712

    Edit: Opened a feature request: microsoft/vscode#136897

  6. 3 remaining items

  7. kimadeline commented on Nov 16, 2021

    @kimadeline

    Fixed upstream in VS Code, this problem doesn't happen anymore in version 1.63.0-insider, commit 6a25ae3, date 2021-11-16T05:13:23.962Z

  8. lutuantai95 commented on Nov 17, 2021

    @lutuantai95
    Author

    Kim-Adeline Miguel (@kimadeline)
    Thanks VS Code team,

    When does vscode(v1.63) release offically?

  9. kimadeline commented on Nov 17, 2021

    @kimadeline

    1.63 will be released in early December, most likely in the week after December 3rd. You can keep track of the work being done on VS Code's iteration plan: microsoft/vscode#136630

  10. jk185312 commented on Nov 18, 2021

    @jk185312

    Strange the message
    "Configured debug type 'python' is installed but not supported in this environment." started appearing all of sudden 30 minutes ago, and i didnt do anything...

  11. JSW0603 commented on Nov 18, 2021

    @JSW0603

    I have used for 9 months VS Code and This error is appeard suddenly.
    In the case that I already have 'python extensions', Do i have to uninstall and install it newly??

  12. kimadeline commented on Nov 18, 2021

    @kimadeline

    Please see my comment above, it is an issue in VS Code, not the Python extension. You can either use the Insiders version of VS Code until 1.63 gets released, or downgrade to an older version of VS Code.

  13. kimadeline commented on Nov 29, 2021

    @kimadeline

    Verification steps:

    • This was fixed upstream in VS Code, make sure to use the latest Insiders version of VS Code
    • Open a workspace with some Python code
    • Add the following configuration to your launch.json:
            {
                "name": "Python: Current File",
                "type": "python",
                "request": "launch",
                "program": "${file}",
                "console": "integratedTerminal"
            },
    • Make sure that no squiggles appear below the "type": "python" line
  14. jk185312 commented on Nov 30, 2021

    @jk185312

    to add configuration: RUN - Add Configuration. (then copy there JSON you need).

  15. rchiodo commented on Nov 30, 2021

    @rchiodo

    /verified

  16. dominiksmagacz commented on Dec 1, 2021

    @dominiksmagacz

    I have this same problem with debug and also when I wanna run the simple script in python (for example print('hello'),

    How is there someone who know how to solved this problem please help us :). I work on MacBook (I do not know if this information is nesesery)

  17. locked as resolved and limited conversation to collaborators on Jan 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-debuggingbugIssue identified by VS Code Team member as probable buginvestigatingWe are looking into the cause of the issueregressionBug didn't exist in a previous releaseverification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions