Open
Description
Type: Bug
Behavior
When I debug a test, instead of breaking at a known python error, it finishes the test and displays an internal error in the Debug Console:
Expected behavior:
It should hit a breakpoint at Project_Hype-Berry/source/hab_task.py:197 due to a KeyError, as I've seen when I run pytest --pdb
in a terminal:
self = <hab_task.HabTask object at 0x7fcc6b2dd5d0>
@property
def dueToday(self):
"""This is intended to tell us if a given daily is due today or not."""
if self.__task_dict['type'] == 'daily':
> return self.__task_dict['isDue']
E KeyError: 'isDue'
/home/alex/Workspace/temp/Project_Hype-Berry/source/hab_task.py:197: KeyError
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> entering PDB >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PDB post_mortem (IO-capturing turned off) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> /home/alex/Workspace/temp/Project_Hype-Berry/source/hab_task.py(197)dueToday()
-> return self.__task_dict['isDue']
(Pdb)
Steps to reproduce:
Steps to reproduce:
- Clone this repo: https://github.com/programmerPhysicist/Project_Hype-Berry
- Checkout the branch vscode-bug:
git checkout vscode-bug
- Open VS Code with
code .
in the repo - Click on the "Testing" tab
- Right click on "dailies_test.py" and select "Debug Test"
- The following behavior
should be observed
Diagnostic data
launch.json
configuration
{
// 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": "Debug oneWaySync",
"type": "debugpy",
"request": "launch",
"program": "one_way_sync.py",
"console": "integratedTerminal",
"justMyCode": false,
"cwd": "${workspaceFolder}/source/",
"env": {"http_proxy":"", "https_proxy": ""},
}
]
}
Output for Python
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Python
)
2025-03-14 22:05:45.055 [info] arg: --rootdir already exists in args, not adding.
2025-03-14 22:05:45.055 [info] Attempting to use temp directory for test ids file, file name: test-ids-768384ddf0dd243c05a7.txt
2025-03-14 22:05:45.056 [info] All environment variables set for pytest execution, PYTHONPATH: "/home/alex/.vscode/extensions/ms-python.python-2025.2.0-linux-x64/python_files:source"
2025-03-14 22:05:45.056 [info] Running DEBUG pytest with arguments: --rootdir=/home/alex/Workspace/temp/Project_Hype-Berry,--capture=no for workspace /home/alex/Workspace/temp/Project_Hype-Berry
2025-03-14 22:05:45.056 [info] Using configuration in launch.json
2025-03-14 22:05:49.563 [error] Test Results named pipe /run/user/1000/python-test-results-c76a773a885ca60ec194 error: [TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at t.PythonResultResolver._resolveExecution (/home/alex/.vscode/extensions/ms-python.python-2025.2.0-linux-x64/out/client/extension.js:2:917078)
at t.PythonResultResolver.resolveExecution (/home/alex/.vscode/extensions/ms-python.python-2025.2.0-linux-x64/out/client/extension.js:2:916387)
at /home/alex/.vscode/extensions/ms-python.python-2025.2.0-linux-x64/out/client/extension.js:2:960049
at b.callback (/home/alex/.vscode/extensions/ms-python.python-2025.2.0-linux-x64/out/client/extension.js:2:930145)
at Object.thunk (/home/alex/.vscode/extensions/ms-python.python-2025.2.0-linux-x64/out/client/extension.js:2:1994360)]
2025-03-14 22:05:50.207 [info] Test Result named pipe /run/user/1000/python-test-results-c76a773a885ca60ec194 cancelled
Output for Python Debugger
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Python Debugger
)
2025-03-14 22:05:45.166 [info] Resolving launch configuration with substituted variables
2025-03-14 22:05:45.187 [info] DAP Server launched with command: /usr/bin/python3 /home/alex/.vscode/extensions/ms-python.debugpy-2025.4.1-linux-x64/bundled/libs/debugpy/adapter
2025-03-14 22:05:45.435 [info] Received 'debugpySockets' event from debugpy.
2025-03-14 22:05:45.438 [info] Received 'debugpySockets' event from debugpy.
2025-03-14 22:05:45.439 [info] Received 'debugpySockets' event from debugpy.
2025-03-14 22:05:45.929 [info] Received 'debugpySockets' event from debugpy.
2025-03-14 22:05:50.199 [info] Received 'debugpySockets' event from debugpy.
2025-03-14 22:05:50.205 [info] Received 'debugpySockets' event from debugpy.
Extension version: 2025.4.1
VS Code version: Code 1.98.2 (ddc367ed5c8936efe395cffeec279b04ffd7db78, 2025-03-12T13:32:45.399Z)
OS version: Linux x64 5.15.0-134-generic
Modes:
- Python version (& distribution if applicable, e.g. Anaconda): 3.10.12
- Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Unknown
Item | Value |
---|---|
CPUs | AMD Ryzen 3 3200U with Radeon Vega Mobile Gfx (4 x 2915) |
GPU Status | 2d_canvas: enabled 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: disabled_software vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: disabled_off webnn: disabled_off |
Load (avg) | 1, 1, 1 |
Memory (System) | 5.72GB (1.35GB free) |
Process Argv | . |
Screen Reader | no |
VM | 0% |
DESKTOP_SESSION | cinnamon |
XDG_CURRENT_DESKTOP | X-Cinnamon |
XDG_SESSION_DESKTOP | cinnamon |
XDG_SESSION_TYPE | x11 |