Skip to content

Debugging inside a container: debugger does not hit breakpoints anymore #20407

@wasphub

Description

@wasphub

Type: Bug

Behaviour

Expected vs. Actual

Context: Debugging code inside a container

Expected: breakpoint are hit when code is executed.
Actual: breakpoints are not hit, and when the debug session the Debug Console shows:

pydev debugger: unable to find translation for: "c:\dev\qxc\model-sample\qxc\app\run.py" in ["C:\dev\qxc\model-sample/qxc/", "C:\dev\qxc\model-sample/qxc"] (please revise your path mappings).

Worth mentioning: rolling back to version v2022.18.2 of the extension fixes the problem without any change in the path mappings. Those mappings were defined weeks ago, and just stopped working with the latest release.

Steps to reproduce:

  1. Configure a project to run and debug inside a container
  2. Set some breakpoints
  3. Run the project
  4. Observe the warning describe above in the Debug Console, and verify that breakpoints are not hit

What seems strange from the message above is that the path inside the container c:\dev\qxc\model-sample\qxc\app\run.py looks like a Windows path, but the container I'm running is from a Linux-based image. I'm on a Windows box with Docker Desktop on WSL2.

Diagnostic data

  • Python version (& distribution if applicable, e.g. Anaconda): 3.7.4
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Global
  • Value of the python.languageServer setting: Default
Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

XXX

User Settings


languageServer: "Pylance"

Extension version: 2022.18.2
VS Code version: Code 1.74.0 (5235c6bb189b60b01b1f49062f4ffa42384f8c91, 2022-12-05T16:38:16.075Z)
OS version: Windows_NT x64 10.0.19044
Modes:
Sandboxed: No

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz (8 x 2112)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
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_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) undefined
Memory (System) 31.86GB (11.04GB free)
Process Argv --folder-uri file:///c%3A/dev/qxc/model-sample --crash-reporter-id d3ea3600-8e75-4ca7-a1d1-6a498426b4ab
Screen Reader no
VM 0%

Metadata

Metadata

Labels

area-debuggingbugIssue identified by VS Code Team member as probable bugneeds PRReady to be worked onregressionBug didn't exist in a previous releaseverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions