`-n` and `-e` cannot be used together
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 42/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Ruby
- Star
- 1.3k
- Fork
- 146
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ruby/debug
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
-
Support exceptionOptions in setExceptionBreakpoints to catch arbitrary exception classes via DAP Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
palladius/rails8-app-on-gcp#145 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
rubocop/rubocop-rspec#2236 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
riscv/riscv-unified-db#2624 · 1 reaction ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100