Line breakpoints aren't shared between processes

Đang mở
#714 1 bình luận 5 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
ruby
Lĩnh vực
devtools

Hướng nghiên cứu

Reproduce the behavior with the Rails/Puma multi-process setup described in the issue, using five workers and line breakpoints. Then inspect the debugger's process handling mechanism; done means a line breakpoint added to one process stops requests handled by every process, with behavior checked in VSCode attach mode.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

Your environment

  • ruby -v: 3.1.0
  • rdbg -v: 1.6.0

Describe the bug

When the debuggee application has multiple processes, line breakpoints added to 1 of them won't be shared to other processes.
This will cause inconsistent breakpoint stop because only that process will stop and others won't.

To Reproduce

This issue should happen to any application that:

  • Has multiple processes
  • Uses line breakpoints

But reproducing it with VSCode is easier:

  1. Create a new rails application

  2. In config/puma.rb, set

    threads 1, 1 # limit the threads number to 1 will increase the reproduction chance
    
    # other configs
    
    workers 5 # increase this number will also help reproduction
    
  3. Start the server with bundle exec rdbg -c -- bundle exec rails s

  4. Set a breakpoint

  5. Attach the debugger

  6. Sending requests to the Rails app

  7. The breakpoint should stop at some requests but not all of them

Expected behavior

The breakpoints should stop at every request

Additional context

@ko1 mentioned that:

  • Resolving this will require rewriting a big part of the process handling mechanism
  • Possible workarounds: 1) Use only 1 process or 2) For VSCode users, use launch mode instead
  • There are no timeline for this issue yet (probably not before Ruby 3.2 is out)
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

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ruby/debug

Tất cả issue của ruby/debug

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.