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

Cannot read properties of undefined (reading 'resolveEnvironment') #333

Open
hk0624 opened this issue May 2, 2024 · 11 comments
Open

Cannot read properties of undefined (reading 'resolveEnvironment') #333

hk0624 opened this issue May 2, 2024 · 11 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug needs spike triage-needed Needs assignment to the proper sub-team

Comments

@hk0624
Copy link

hk0624 commented May 2, 2024

VSCode 1.88.1
When Press F5 or Ctrl+F5,it pops up a message "Cannot read properties of undefined (reading 'resolveEnvironment') " and stop debug.

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label May 2, 2024
@blueardour
Copy link

same error on 1.83.1

@JianxiangL
Copy link

same error on 1.89.1

版本: 1.89.1 (user setup)
提交: dc96b837cf6bb4af9cd736aa3af08cf8279f7685
日期: 2024-05-07T05:13:33.891Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Windows_NT x64 10.0.22631

@paulacamargo25
Copy link
Contributor

Thanks for the bug report, could you share your configuration in the launch.json file? Thanks

@paulacamargo25 paulacamargo25 added the info-needed Issue requires more information from poster label May 30, 2024
@JianxiangL
Copy link

感谢您的错误报告,您能否在文件中分享您的配置?谢谢launch.json

{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: 当前文件",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
}
]
}
抱歉之前忽略了您的回复,这个问题我已经解决,方法就是重新安装配置了一下conda虚拟环境。

@paulacamargo25
Copy link
Contributor

Could you try with using type: "debugpy" in your config? Thanks

@onahkenneth
Copy link

Same error on 1.92.2

Config in launch.json

{ "version": "0.2.0", "configurations": [ { "name": "Python Debugger: Current File", "type": "debugpy", "request": "launch", "program": "${file}", "console": "integratedTerminal" } ] }

@Josie-xufan
Copy link

same error on 1.92.2

Config in launch.json

{
// 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",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
}
]
}

@onahkenneth
Copy link

onahkenneth commented Aug 31, 2024

@Josie-xufan

Ensure you install debugpy module

Copy link

Hey @karthiknadig, this issue might need further attention.

@hk0624, you can help us out by closing this issue if the problem no longer exists, or adding more information.

Copy link

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@vs-code-engineering vs-code-engineering bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 31, 2024
@karthiknadig karthiknadig reopened this Oct 31, 2024
@karthiknadig karthiknadig added bug Issue identified by VS Code Team member as probable bug needs spike and removed info-needed Issue requires more information from poster labels Oct 31, 2024
@DINGdeZHENZ
Copy link

There is the same issue in VSC 1.95.2
I do not have any idea to solve it.

Version: 1.95.2 (user setup)
Commit: e8653663e8840adaf45af01eab5c627a5af81807
Date: 2024-11-07T11:07:22.054Z
Electron: 32.2.1
ElectronBuildId: 10427718
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0

Launch.json

{
    // 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 Debugger: Current File",
            "type": "debugpy",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "justMyCode": false
        }
    ]
}

Log of Extension Host

2024-11-08 10:53:45.215 [error] TypeError: Cannot read properties of undefined (reading 'resolveEnvironment')
	at l (c:\Users\sys\.vscode\extensions\ms-python.debugpy-2024.12.0-win32-x64\dist\extension.js:2:835287)
	at async c:\Users\sys\.vscode\extensions\ms-python.debugpy-2024.12.0-win32-x64\dist\extension.js:2:905338
	at async Y0.h (file:///d:/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:114:32825) debugpy.debugUsingLaunchConfig {"value":"ms-python.debugpy","_lower":"ms-python.debugpy"}

BTW, i'm using Conda to manage the project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug needs spike triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

8 participants