Debugger stops at unexpected place when using `trace call`
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
- 38/100
Hướng nghiên cứu
Reproduce with the listed Ruby 3.1.0 and rdbg 1.7.1 steps using the testapp, then follow the trace call entry point and breakpoint at line 9 in app/controllers/students_controller.rb. Confirm the debugger stops at line 9 rather than line 7 after continuing; the issue has no named debugger source file or test.
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.1.0p0 (2021-12-25 revision fb4df44d16) [arm64-darwin21]
rdbg -v:- rdbg 1.7.1
To Reproduce
- Clone https://github.com/ono-max/testapp
bundle installrails db:createrails db:migratebin/rails s
$ bin/rails s
=> Booting Puma
=> Rails 7.0.4.2 application starting in development
=> Run `bin/rails server --help` for more startup options
Puma starting in single mode...
* Puma version: 5.6.5 (ruby 3.0.3-p157) ("Birdie's Version")
* Min threads: 5
* Max threads: 5
* Environment: development
* PID: 28208
* Listening on http://127.0.0.1:3000
* Listening on http://[::1]:3000
Use Ctrl-C to stop
- Go to localhost:3000, then it should stop as follows:
...
Use Ctrl-C to stop
Started GET "/" for ::1 at 2023-02-14 01:57:49 +0900
ActiveRecord::SchemaMigration Pluck (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
Processing by StudentsController#index as HTML
[1, 10] in ~/workspace/testapp/app/controllers/students_controller.rb
1| class StudentsController < ApplicationController
2| before_action :set_student, only: %i[ show edit update destroy ]
3|
4| # GET /students or /students.json
5| def index
=> 6| binding.break
7| student1 = Student.first
8| student2 = Student.last
9| end
10|
=>#0 StudentsController#index at ~/workspace/testapp/app/controllers/students_controller.rb:6
#1 ActionController::BasicImplicitRender#send_action(method="index", args=[]) at ~/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/actionpack-7.0.4.2/lib/action_controller/metal/basic_implicit_render.rb:6
# and 75 frames (use `bt' command for all frames)
- "trace call"
- Set a breakpoint at line 9
- Then continue.
- Stop at line 7
...
[2, 11] in ~/workspace/testapp/app/controllers/students_controller.rb
2| before_action :set_student, only: %i[ show edit update destroy ]
3|
4| # GET /students or /students.json
5| def index
6| binding.break
=> 7| student1 = Student.first
8| student2 = Student.last
9| end
10|
11| # GET /students/1 or /students/1.json
=>#0 StudentsController#index at ~/workspace/testapp/app/controllers/students_controller.rb:7 #=> nil
#1 ActionController::BasicImplicitRender#send_action(method="index", args=[]) at ~/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/actionpack-7.0.4.2/lib/action_controller/metal/basic_implicit_render.rb:6
# and 75 frames (use `bt' command for all frames)
...
Expected behavior
It should stop at line 9.
Additional context
Add any other context about the problem here.
- 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ó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
バグ
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
Version bump for OpenVox 9 Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
voxpupuli/puppet-epel#186 · 1 bình luận ·
-
external_created_at is no longer used for the message timestamp since the new message UI (v4.4.0) Đang mởBug Frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100