Cannot set remote breakpoints in Visual Studio Community 2022 (Version 17.9.3)
まだ誰も着手していません。
評価
調査の方向性
debugpy/_vendored/pydevd/pydevd_file_utils.py、特に set_ide_os(os) から調査を開始し、添付された adapter、pydevd、server のログを、報告されているパス変換の手順と比較します。記載されている環境を使用して Windows から Ubuntu へのリモートアタッチを再現し、変換されたパスの前後でのスラッシュ変換を調べます。事前に設定したブレークポイントと接続後に設定したブレークポイントの両方が、ファイルが存在しないという報告ではなく /home/shamada/debug/b.py に解決されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Python
- スター
- 2.5k
- フォーク
- 202
- 平均マージ
- 5日 1時間
- マージ済み PR(30日)
- 1
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/debugpy のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
microsoft/debugpy の issue をすべて見る
似ている issue
-
area: harness bug status: needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Human-Agent-Society/reef#625 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
learningequality/kolibri#15351 · コメント 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
Name consistency オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
eellak/triplestore#65 · コメント 1 件 ·