-
Notifications
You must be signed in to change notification settings - Fork 27
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
Unable to debug tests: Invalid message: Found duplicate in "env": PATH #261
Comments
I know there also exists microsoft/vscode-python#10722, but as the debugger is now a separate extension I was not sure if this should now be handled in this repo? |
I tried to reproduce this issue on a second Windows machine (Windows 11), but there it worked fine. What I also tried so far:
There is no
For reference, here is my full user User settings.json
{
"workbench.startupEditor": "none",
"workbench.editorAssociations": {
"*.ipynb": "jupyter-notebook"
},
"notebook.cellToolbarLocation": {
"default": "right",
"jupyter-notebook": "left"
},
"terminal.integrated.defaultProfile.windows": "Command Prompt",
"cmake.configureOnOpen": false,
"csharp.suppressDotnetInstallWarning": true,
"python.formatting.provider": "black",
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnType": true
},
"files.exclude": {
"**/__pycache__": true,
"**/*.pyc": true
},
"testOnSave.testCommand": "",
"python.defaultInterpreterPath": "C:\\Python38\\Scripts\\python.exe",
"explorer.confirmDragAndDrop": false,
"editor.formatOnSave": true,
"workbench.iconTheme": "vscode-icons",
"plantuml.server": "...",
"plantuml.render": "PlantUMLServer",
"remote.SSH.remotePlatform": {
"dev-ec2": "linux",
"ssm-dev-ec2": "linux"
},
"redhat.telemetry.enabled": false,
"vsicons.dontShowNewVersionMessage": true,
"java.configuration.runtimes": [
{
"name": "...",
"path": "..."
}
],
"maven.settingsFile": "C:\\ProgramData\\chocolatey\\lib\\maven\\apache-maven-3.8.6\\conf\\settings.xml",
"java.configuration.maven.userSettings": "C:\\ProgramData\\chocolatey\\lib\\maven\\apache-maven-3.8.7\\conf\\settings.xml",
"testOnSave.languageId": "",
"editor.stickyScroll.enabled": true,
"git.autofetch": true,
"markdown.validate.enabled": true,
"git.confirmSync": false,
"eslint.workingDirectories": ["frontend"],
"workbench.colorTheme": "Default Dark+",
"prettier.printWidth": 160,
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"sonarlint.rules": {
"python:S107": {
"level": "off"
}
},
"java.configuration.maven.globalSettings": "C:\\ProgramData\\chocolatey\\lib\\maven\\apache-maven-3.8.7\\conf\\settings.xml",
"java.configuration.updateBuildConfiguration": "automatic",
"boot-java.rewrite.reconcile": true,
"java.format.settings.url": "...",
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"maven.terminal.useJavaHome": true,
"explorer.confirmDelete": false,
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"prettier.singleQuote": true,
"pylint.importStrategy": "fromEnvironment",
"editor.renderWhitespace": "trailing",
"robot.variables": {},
"editor.guides.bracketPairs": "active",
"editor.detectIndentation": false,
"window.zoomLevel": -1,
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"jupyter.askForKernelRestart": false,
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"robot.completions.keywords.prefixImportName": true,
"continue.telemetryEnabled": false,
"continue.enableTabAutocomplete": false,
"mypy-type-checker.importStrategy": "fromEnvironment",
"mypy-type-checker.args": ["--ignore-missing-imports", "--implicit-optional"],
"accessibility.signals.terminalQuickFix": {
"sound": "on"
},
"markdownlint.config": {
"MD024": {
"siblings_only": true
}
},
"python.experiments.enabled": false
} In addition, the config setting for If there is any additional information that I can provide to help find the root cause, please let me know. |
With the following {
// 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: Debug Test",
"purpose": ["debug-test"],
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
}
]
} Changing |
Hello! Sorry for the delay but are you still experiencing this issue? |
Hi! Yes, the issue still exists. The workaround with the modified I am using the current version 1.93.1:
|
Just to add a datapoint: I have the same issue. I'm also on Win10, but I get the error regardless of |
I found what caused the issue for me. There was an incorrect entry in the Path environment variable in windows. There was a folderpath which contained a After removing the entry, I could debug tests again. Hope that is helpful for some of you; maybe the error message could be improved to reflect this possible error source. |
Type: Bug
Plugin Versions
Python: v2024.2.1
Python Debugger: v2024.2.0
Behaviour
Expected vs. Actual
Expected: When selecting "debug test" from test runner or the editor, the debugger should start.
Actual: Debugger fails to start. Popup dialog with message "Invalid message: Found duplicate in "env": PATH." is displayed.
Steps to reproduce:
Diagnostic data
python.languageServer
setting: DefaultOutput for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Output for Python Debugger
``` 2024-03-12 17:26:32.337 [info] Name: Python Debugger 2024-03-12 17:26:32.337 [info] Module: debugpy 2024-03-12 17:27:29.664 [info] DAP Server launched with command: C:\Python38\python.exe c:\Users\z003emnm\.vscode\extensions\ms-python.debugpy-2024.2.0-win32-x64\bundled\libs\debugpy\adapter 2024-03-12 17:28:25.647 [info] DAP Server launched with command: C:\Python38\python.exe c:\Users\z003emnm\.vscode\extensions\ms-python.debugpy-2024.2.0-win32-x64\bundled\libs\debugpy\adapter ```
User Settings
Extension version: 2024.2.0
VS Code version: Code 1.87.0 (019f4d1419fbc8219a181fab7892ebccf7ee29a2, 2024-02-27T23:41:44.469Z)
OS version: Windows_NT x64 10.0.19045
Modes:
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: