Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#1,541 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
devtools

調査の方向性

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/debugpy のほかの issue

microsoft/debugpy の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。