`-n` and `-e` cannot be used together
まだ誰も着手していません。
評価
調査の方向性
Start with rdbg's command-line handling for -n, -e, and -c, then run the provided OpenStruct reproduction to observe the current behavior. Done means the command stops at OpenStruct#initialize and opens the attached rdbg shell without requiring continue in -e.
索引モデルが issue の本文から書いたものです。
説明
Your environment
λ ruby -v
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-darwin22]
λ rdbg -v
rdbg 1.7.1
Describe the bug
I was trying to execute some command with -c and specify a break point using -e so that I don't need to write the script in the rdbg again.
It works but I still need to manually run continue, to avoid this, I thought -n could help. However, after some tests I turns out -n and -e cannot be used together.
My current workaround is to put continue in -e:
rdbg -c -e 'b OpenStruct#initialize'$'\n''continue' -- ruby -rostruct -e 'OpenStruct.new'
To Reproduce
rdbg -n -c -e 'b OpenStruct#initialize' -- ruby -rostruct -e 'OpenStruct.new'
Expected behavior
process won't exit and attached rdbg shell on OpenStruct#initialize, output should look like:
[122, 131] in /usr/local/Cellar/ruby/3.2.2/lib/ruby/3.2.0/ostruct.rb
122| # data = OpenStruct.new(hash)
123| #
124| # data # => #<OpenStruct country="Australia", capital="Canberra">
125| #
126| def initialize(hash=nil)
=> 127| if hash
128| update_to_values!(hash)
129| else
130| @table = {}
131| end
=>#0 OpenStruct#initialize(hash=nil) at /usr/local/Cellar/ruby/3.2.2/lib/ruby/3.2.0/ostruct.rb:127
#1 [C] Class#new at -e:1
# and 1 frames (use `bt' command for all frames)
Stop by #0 BP - Method OpenStruct#initialize at /usr/local/Cellar/ruby/3.2.2/lib/ruby/3.2.0/ostruct.rb:126
Additional context
process exists and prints nothing.
- 主要言語
- Ruby
- スター
- 1.3k
- フォーク
- 146
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ruby/debug のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
-
Support exceptionOptions in setExceptionBreakpoints to catch arbitrary exception classes via DAP オープン
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
palladius/rails8-app-on-gcp#145 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
rubocop/rubocop-rspec#2236 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
riscv/riscv-unified-db#2624 · リアクション 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100