Skip to content

Cannot set remote breakpoints in Visual Studio Community 2022 (Version 17.10.3) #1614

@github-shamada

Description

@github-shamada

Symptoms

Remote debugging using VS2022+debugpy does not work properly.
The remote connection is successful, but Breakpoint cannot be set.

Environmental Data

Client environment

  • Windows-10
  • Visual Studio 2022 (ver 17.10.3)
  • debugpy 1.8.1
  • workdir: \10.123.36.238\shamada\debug\

Server environment

  • Ubuntu-22.0.4
  • Python 3.11.5
  • debugpy 1.8.1
  • workdir: /home/shamada/debug/

Execution steps and results

Execution steps

[server side]
export DEBUGPY_LOG_DIR="/home/shamada/debug"
export DEBUG_PYDEVD_PATHS_TRANSLATION=1
export PATHS_FROM_ECLIPSE_TO_PYTHON='[["\\10.123.36.238\shamada\", "/home/shamada/"]]'
python -Xfrozen_modules=off -m debugpy --wait-for-client --listen 0.0.0.0:5678 b.py

[cliennt side]
execute [debug]/[attach to process] menu
set connection type "python remote (debugpy)"
set connection target "tcp://10.177.36.238:5678/"

Results

Process attachment succeeds.
Pre-set breakpoints are disabled.
Breakpoints set after connection are also disabled.
Followings are their error messages:
the breakpoit will not currently be hit. breakpoint in file that does not exist.

devenv_TON24RzrbZ

Investigation

debugpy.pydevd.log contains logs like the following.

0.00s - Request for breakpoint in: \\10.123.36.238\shamada\debug\b.py line: 3
0.00s - pydev debugger: replacing to server: \\10.123.36.238\shamada\debug\b.py
0.00s - pydev debugger: sent to server: /home/shamada/debug\b.py - matched prefix: \\10.123.36.238\shamada\
0.00s - Breakpoint (after path translation) in: /home/shamada/debug\b.py line: 3
0.00s - os.path.exists('/home/shamada/debug\\b.py') returned False.

It seems that the cause is that slashes and backslashes are not converted properly in path mapping.
Please see the attached file for all logs.

debugpy.adapter-270155.log
debugpy.pydevd.269778.log
debugpy.server-269778.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions