vscode-python: After switching to devcontainer (based on 3.10-bullseye python) can't go to test or run test

Type: Bug

  • Create project with pytest tests
  • Create devcontainer in existsing project based on python
  • Try to run or go to single test in testing extension inside devcontainer

Extension version: 2022.14.0 VS Code version: Code 1.71.2 (Universal) (74b1f979648cc44d385a2286793c226e611f59e7, 2022-09-14T21:05:37.721Z) OS version: Darwin arm64 21.6.0 Modes: Sandboxed: No Remote OS version: Linux arm64 5.10.124-linuxkit

System Info
Item Value
CPUs Apple M1 (8 x 24)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
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) 2, 2, 2
Memory (System) 16.00GB (0.07GB free)
Process Argv –crash-reporter-id f9cfdfe4-4be9-4e74-ae0f-ac6ba8ac6c27
Screen Reader no
VM 0%
Item Value
Remote Dev Container: backend
OS Linux arm64 5.10.124-linuxkit
CPUs unknown (4 x 0)
Memory (System) 7.67GB (6.52GB free)
VM 0%
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vsdfh931cf:30280410
vshan820:30294714
vstes263:30335439
vscoreces:30445986
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411cf:30557515
vsaa593:30376534
pythonvs932:30410667
cppdebug:30492333
vsclangdf:30486550
c4g48928:30535728
hb751961:30553087
dsvsc012:30540252
azure-dev_surveyone:30548225
2144e591:30553903
vscccc:30566498
fc301958:30567733

The problem is that the VSCode tries to access absolute paths inside the masOS, but they do not exist inside the devcontainer

Снимок экрана 2022-09-19 в 15 51 47

Снимок экрана 2022-09-20 в 13 40 56

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 3
  • Comments: 17 (10 by maintainers)

Commits related to this issue

Most upvoted comments

you need to put it in the settings for the dev container instead of the user settings- sorry if I said that incorrectly.

FYI I was able to resolve this by removing all __pycache__ directories and preventing them from being created by using the PYTHONDONTWRITEBYTECODE=1 environment variable.