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

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

Closed
1 task done
lutuantai95 opened this issue Nov 7, 2021 · 17 comments
Closed
1 task done
Assignees
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug investigating We are looking into the cause of the issue regression Bug didn't exist in a previous release verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@lutuantai95
Copy link

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
@lutuantai95 lutuantai95 added bug Issue identified by VS Code Team member as probable bug triage-needed Needs assignment to the proper sub-team labels Nov 7, 2021
@ZeningLin
Copy link

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

@karthiknadig karthiknadig added area-debugging triage and removed triage-needed Needs assignment to the proper sub-team labels Nov 8, 2021
@kimadeline
Copy link

kimadeline commented Nov 9, 2021

Hi @lutuantai95 and @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.

@kimadeline kimadeline added investigating We are looking into the cause of the issue regression Bug didn't exist in a previous release and removed triage labels Nov 9, 2021
@ZeningLin
Copy link

ZeningLin commented Nov 9, 2021

Hi @lutuantai95 and @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.

@kimadeline
Copy link

kimadeline commented Nov 9, 2021

Filed upstream: microsoft/vscode#136712

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

@lutuantai95
Copy link
Author

lutuantai95 commented Nov 9, 2021

Hi @lutuantai95 and @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.

Yes, i could still debug despite warning.

I didn't see any warnings about shell resolution.

@garu57
Copy link

garu57 commented Nov 14, 2021

Pls, see my comment on #18024, "purpose": ["debug-test"] launch configurations do not start any longer.
Edit: Sorry false problem, after cleaning data dir and restart, launch configurations works again.

@408550969
Copy link

I solved this problem after I activated conda

@kimadeline kimadeline added this to the November 2021 milestone Nov 16, 2021
@kimadeline
Copy link

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

@lutuantai95
Copy link
Author

@kimadeline
Thanks VS Code team,

When does vscode(v1.63) release offically?

@kimadeline
Copy link

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

@jk185312
Copy link

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...

@JSW0603
Copy link

JSW0603 commented Nov 18, 2021

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??

@kimadeline
Copy link

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.

@karthiknadig karthiknadig added the verification-needed Verification of issue is requested label Nov 29, 2021
@kimadeline
Copy link

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

@jk185312
Copy link

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

@rchiodo rchiodo added the verified Verification succeeded label Nov 30, 2021
@rchiodo
Copy link

rchiodo commented Nov 30, 2021

/verified

@dominiksmagacz
Copy link

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)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug investigating We are looking into the cause of the issue regression Bug didn't exist in a previous release verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

10 participants