Skip to content

Read test debug configuration from settings not just launch.json #532

@ElPincheTopo

Description

@ElPincheTopo

Issue Type: Bug

Behaviour

Expected vs. Actual

Adding this to my .vscode/launch.json allows me to use breakpoints in third-party libraries when debbuging unit tests:

{
	"name": "Debug Unit Test",
	"type": "python",
	"request": "test",
	"justMyCode": false
}

I expect that adding the same to the launch section of my workspace settings would produce the same behaviour but this is not true.

Steps to reproduce:

  1. Add the above debug config to your .vscode/launch.json file.
  2. Add a breakpoint to a third party tool.
  3. Debug a unit test that calls the third party code and the debbuger will stop in the breakpoint.
  4. Delete the .vscode/launch.json file.
  5. Add the above debug config in your workspace settings.
  6. Add a breakpoint to a third party tool.
  7. Debug a unit test that calls the third party code and the debbuger will skip the breakpoint.

Diagnostic data

  • Python version (& distribution if applicable, e.g. Anaconda): 3.10.0
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Venv
  • Value of the python.languageServer setting: Default
User Settings


defaultLS: {"defaultLSType":"Pylance"}

downloadLanguageServer: true

envFile: "<placeholder>"

venvPath: "<placeholder>"

venvFolders: "<placeholder>"

condaPath: "<placeholder>"

pipenvPath: "<placeholder>"

poetryPath: "<placeholder>"

languageServer: "Pylance"

linting
• enabled: true
• cwd: "<placeholder>"
• Flake8Args: "<placeholder>"
• flake8Enabled: true
• flake8Path: "<placeholder>"
• lintOnSave: true
• banditArgs: "<placeholder>"
• banditEnabled: false
• banditPath: "<placeholder>"
• mypyArgs: "<placeholder>"
• mypyEnabled: true
• mypyPath: "<placeholder>"
• pycodestyleArgs: "<placeholder>"
• pycodestyleEnabled: false
• pycodestylePath: "<placeholder>"
• prospectorArgs: "<placeholder>"
• prospectorEnabled: false
• prospectorPath: "<placeholder>"
• pydocstyleArgs: "<placeholder>"
• pydocstyleEnabled: false
• pydocstylePath: "<placeholder>"
• pylamaArgs: "<placeholder>"
• pylamaEnabled: false
• pylamaPath: "<placeholder>"
• pylintArgs: "<placeholder>"
• pylintPath: "<placeholder>"

sortImports
• args: "<placeholder>"
• path: "<placeholder>"

formatting
• autopep8Args: "<placeholder>"
• autopep8Path: "<placeholder>"
• provider: "autopep8"
• blackArgs: "<placeholder>"
• blackPath: "<placeholder>"
• yapfArgs: "<placeholder>"
• yapfPath: "<placeholder>"

testing
• cwd: "<placeholder>"
• debugPort: 3000
• nosetestArgs: "<placeholder>"
• nosetestsEnabled: undefined
• nosetestPath: "<placeholder>"
• promptToConfigure: true
• pytestArgs: "<placeholder>"
• pytestEnabled: true
• pytestPath: "<placeholder>"
• unittestArgs: "<placeholder>"
• unittestEnabled: false
• autoTestDiscoverOnSaveEnabled: true

terminal
• activateEnvironment: true
• executeInFileDir: "<placeholder>"
• launchArgs: "<placeholder>"

experiments
• enabled: true
• optInto: []
• optOutFrom: []

insidersChannel: "off"

tensorBoard
• logDirectory: "<placeholder>"

Extension version: 2022.2.1924087327
VS Code version: Code 1.65.2 (c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1, 2022-03-10T15:36:26.048Z)
OS version: Linux x64 4.14.240
Restricted Mode: No

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugtriage-neededNeeds assignment to the proper sub-team

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions