microsoft / debugpy

An implementation of the Debug Adapter Protocol for Python
https://pypi.org/project/debugpy/
Other
1.87k stars 139 forks source link

Bug no such file or directory ~/.local/lib #1712

Closed AppalachianGoat closed 3 weeks ago

AppalachianGoat commented 1 month ago

Type: Bug

Behaviour

Strange error in which python debugger tries to use something other than the mamba environment that is configured.

Exception has occurred: FileNotFoundError
[Errno 2] No such file or directory: '/home/nicholas/.local/lib'
  File "/home/nicholas/micromamba/envs/tmm-extract/lib/python3.12/posixpath.py", line 470, in _joinrealpath
    st = os.lstat(newpath)
         ^^^^^^^^^^^^^^^^^
  File "/home/nicholas/micromamba/envs/tmm-extract/lib/python3.12/posixpath.py", line 435, in realpath
    path, ok = _joinrealpath(filename[:0], filename, strict, {})
  File "/home/nicholas/micromamba/envs/tmm-extract/lib/python3.12/runpy.py", line 88, in _run_code
    exec(code, run_globals)
  File "/home/nicholas/micromamba/envs/tmm-extract/lib/python3.12/runpy.py", line 198, in _run_module_as_main
    return _run_code(code, main_globals, None,
FileNotFoundError: [Errno 2] No such file or directory: '/home/nicholas/.local/lib'

Steps to reproduce:

  1. attempt debug in python with a micromamba configured environment selected as interpreter

Diagnostic data

cd /home/nicholas/projects/tmm/extraction ; /usr/bin/env /home/nicholas/micromamba/envs/tmm-ext ract/bin/python /home/nicholas/.vscode-server/extensions/ms-python.debugpy-2024.10.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher 33619 -- / home/nicholas/.vscode-server/extensions/ms-python.python-2024.14.1-linux-x64/python_files/vscode_pytest/run_pytest_script.py --rootdir=/home/nicholas/project s/tmm/extraction --capture=no launch.json configuration

``` XXX ```

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

``` XXX ```

Output for Python Debugger in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python Debugger)

``` XXX ```

Extension version: 2024.12.0 VS Code version: Code 1.94.2 (384ff7382de624fb94dbaf6da11977bba1ecd427, 2024-10-09T16:08:44.566Z) OS version: Windows_NT x64 10.0.22631 Modes: Remote OS version: Linux x64 5.15.153.1-microsoft-standard-WSL2

Item Value
CPUs 13th Gen Intel(R) Core(TM) i7-13700H (20 x 2918)
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: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 47.68GB (28.10GB free)
Process Argv --folder-uri=vscode-remote://wsl+Ubuntu/home/nicholas/projects/tmm/extraction --remote=wsl+Ubuntu --crash-reporter-id 6885f3ec-c7c5-4e90-96eb-13d61dfe4c75
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 5.15.153.1-microsoft-standard-WSL2
CPUs 13th Gen Intel(R) Core(TM) i7-13700H (20 x 0)
Memory (System) 23.31GB (19.24GB free)
VM 0%

A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256860
vscod805:30301674
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30959799
pythongtdpath:30769146
pythonnoceb:30805159
asynctok:30898717
pythonmypyd1:30879173
2e7ec940:31000449
pythontbext0:30879054
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
g316j359:31013175
dvdeprecation:31068756
dwnewjupytercf:31046870
impr_priority:31102340
nativerepl1:31139838
refactort:31108082
pythonrstrctxt:31112756
wkspc-onlycs-t:31132770
wkspc-ranged-t:31151552
cf971741:31144450
defaultse:31146405
iacca2:31156134
notype1cf:31157160
5fd0e150:31155592
dwcopilot:31164048
icondisabled:31158250

AppalachianGoat commented 1 month ago

Ah my bad just realized this was getting triggered by having activated the raise_errors option. However I do find it a little ridiculous that this will then block at errors in the debugger itself before allowing me to proceed to the code.

rchiodo commented 1 month ago

Did you have justMyCode set to false? That would be expected then. All errors are logged because everything is considered.