Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Cannot set remote breakpoints in Visual Studio Community 2022 (Version 17.9.3)

Open
#1,541 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
devtools

Research direction

Start with debugpy/_vendored/pydevd/pydevd_file_utils.py, especially set_ide_os(os), and compare the attached adapter, pydevd, and server logs with the reported path translation steps. Reproduce the Windows-to-Ubuntu remote attach using the listed environments and inspect the slash conversion around the translated path. Done means both pre-set and post-connection breakpoints resolve to /home/shamada/debug/b.py instead of reporting that the file does not exist.

Written by the indexing model from the issue text.

Description

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 Community 2022 (ver 17.9.3)
  • debugpy 1.8.0
  • workdir: \10.123.36.238\shamada\debug\
Server environment
  • Ubuntu-22.0.4
  • Python 3.11.5
  • debugpy 1.8.0
  • 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/"]]'
conda activate py311a
python -Xfrozen_modules=off -m debugpy --wait-for-client --listen 0.0.0.0:5678 b.py

[cliennt side]
execute "attach to process"
execute "python remote (debugpy)"

Results

Pre-set breakpoints will be disabled.
Breakpoints set after connection are also disabled.
Both breakpoints are given the error message "Breakpoint in file that does not exist."

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-4104855.log
debugpy.pydevd.4104847.log
debugpy.server-4104847.log

Additional attempts

Referring to the previous issue below, I modified the system file below on both the client and server.
Cannot set remote breakpoints in Visual Studio Community 2019 (Version 16.6.1)

File: debugpy/_vendored/pydevd/pydevd_file_utils.py
Location: in set_ide_os(os) function

Add the following.
os = 'WINDOWS'

The symptoms did not change.

Dominant language
Python
Stars
2.5k
Forks
202
Avg merge
5d 1h
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/debugpy

All issues in microsoft/debugpy

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.