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

Debugger times out if shell startup is "slow"

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

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

評価

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

調査の方向性

~/.zshrc または ~/.bashrc に長いスリープを追加してから、VS Code で debugpy セッションを開始し、タイムアウトを再現します。ターミナルの起動とデバッグコマンドの引き渡しを追跡します。デバッガーがシェルの準備完了を待ち、コマンドを破棄するのではなく正常に開始すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug

Environment data

  • debugpy version: v2024.6.0
  • OS and version: macos 14.4.1
  • Python version (& distribution if applicable, e.g. Anaconda): 3.10 CPython
  • Using VS Code or Visual Studio: VS Code

Actual behavior

Debugger never starts and shows "timeout" error window.
In the terminal output you can see that the debugger command has been "pasted"/send to the terminal but the terminal was not ready yet. Hence, the command is discarded.
Its very similar to the issue described here: https://github.com/microsoft/vscode-js-debug/issues/1642

Expected behavior

Debugger waits for terminal to finish and then sends the command to the terminal.

Steps to reproduce:

  1. add a slow command to shell startup, e.g. "sleep 120" to ~/.zshrc or ~/.bashrc
  2. start any debug session with debugpy
  3. debugger will timeout

Background:

I have a zshrc setup that includes some startup scripts which usually take ~0.5-3 seconds. I've never found a satisfying workaround for this and many of the suggested solutions in the Issues in this repo never worked for me.

Current Workaround:

Currently, I am using a setting which works well enough for me
Here is the link to the vscode docs: https://code.visualstudio.com/docs/terminal/profiles#_configuring-the-taskdebug-profile
and here is the setting for me:

{ 
  "terminal.integrated.automationProfile.osx": {
    "path": "bash",
  },
}

However, I wish this extension/debugger would support the same solution as https://github.com/microsoft/vscode-js-debug/issues/1642.

主要言語
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 を短くまとめたダイジェスト。