Line breakpoints aren't shared between processes

オープン
#714 コメント 1 件 リアクション 5 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
ruby
領域
devtools

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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)
主要言語
Ruby
スター
1.3k
フォーク
146
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ruby/debug のほかの issue

ruby/debug の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。