Skip to content

Debugging test in VS Code does not workΒ #10722

@asipras

Description

@asipras

Environment data

Version: 1.43.1 (user setup)
Commit: fe22a9645b44368865c0ba92e2fb881ff1afce94
Date: 2020-03-18T07:01:20.184Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.18363

  • Python version (& distribution if applicable, e.g. Anaconda): Python Anaconda 3.7.6 64-bit
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): Anaconda 1.9.12
  • Relevant/affected Python packages and their versions: Python 2020.3.69010
  • Relevant/affected Python-related VS Code extensions and their versions: Python 2020.3.69010

Expected behaviour

Debugging test should work.

Actual behaviour

Debugging test does not work. VS code shows error dialog. See in reproduction steps for more details. If I run the test without debugger the tests runs as expected.

Steps to reproduce:

Try to debug tests using unit test library, Click on the small bug icon for an individual test to debug.
I get a dialog box error saying Invalid message: Duplicate entries in "env". The two options i get are Open launch.json and Cancel.

I have checked my lauch.json and I do not have duplicate entries for any env variable.

Logs

ERR timeout after 500 ms: Error: timeout after 500 ms
at t.RawDebugSession.handleErrorResponse (file:///C:/Users/AP/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2954:952)
at file:///C:/Users/AP/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2954:250
at async t.RawDebugSession.shutdown (file:///C:/Users/AP/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:2952:336)

### Settings.json

{
    "python.testing.pytestArgs": [
        "tests"
    ],
    "python.testing.unittestEnabled": false,
    "python.testing.nosetestsEnabled": false,
    "python.testing.pytestEnabled": true
}

Metadata

Metadata

Assignees

Labels

area-debuggingarea-environmentsFeatures relating to handling interpreter environmentsarea-testingbugIssue identified by VS Code Team member as probable bugtriage-neededNeeds assignment to the proper sub-team

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions