Recursively debugging using "debug" doesn't preserve cli args
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- bash
- 領域
- cli
調査の方向性
Reproduce the issue with the provided git hook setup and the recursive "debug" command. Start by tracing how the recursive bashdb invocation is built, then verify that --tty /dev/tty and --tty_in /dev/tty are preserved so /tmp/otherscript enters the debugger instead of quitting.
索引モデルが issue の本文から書いたものです。
説明
I was debugging a bash script whose stdin and stdout were not my tty (a git hook, to be precise), and passed --tty /dev/tty --tty_in /dev/tty which worked great to be able to debug that initial script.
However, that script ran some other scripts, and attempting to recursively step into those with the default "debug" command didn't work because that sub-invocation of bashdb didn't preserve the --tty and --tty_in arguments.
To reproduce the problem:
# Create a minimal git repo
git init myrepo
cd myrepo
touch foo ; git add foo ; git commit -m foo foo
# Set up the hook scripts:
cat <<EOF > .git/hooks/post-checkout
bashdb --tty /dev/tty --tty_in /dev/tty /tmp/somescript
EOF
chmod +x .git/hooks/post-checkout
echo "/tmp/otherscript" > /tmp/somescript
echo "echo end of somescript" >> /tmp/somescript
echo "echo in otherscript" > /tmp/otherscript
echo "echo another line" >> /tmp/otherscript
chmod +x /tmp/*script
git checkout HEAD # Trigger the hook
Then enter debug on the /tmp/otherscript line, and notice that you don't end up debugging it, the inner bashdb immediately quits with "That's all, folks..."
I'm guessing that many of the other cli args should be preserved to sub-bashdb invocations as well.
- 主要言語
- Shell
- スター
- 98
- フォーク
- 13
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Trepan-Debuggers/bashdb のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
Trepan-Debuggers/bashdb#63 · コメント 4 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
Trepan-Debuggers/bashdb#32 · コメント 1 件 ·
Trepan-Debuggers/bashdb の issue をすべて見る
似ている issue
-
package-update
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
bug needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
vllm-project/vllm-metal#841 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
obra/superpowers#2394 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
CachyOS/cachyos-aur-derived#772 ·
メンテナーはふだん 1 日以内に返信