remote debugger failing on first hit with puma
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 35/100
Piste de recherche
Start by reproducing the first-hit failure with Ruby 3.3.5, rdbg 1.9.2, Puma in a local Docker container, and the Sinatra request flow described. Inspect the remote debugger behavior around the initial SIGURG and step transition, including the reported Puma and Rack paths. Done means the first breakpoint can be stepped through normally without losing context.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Your environment
ruby -v: 3.3.5rdbg -v: 1.9.2
Describe the bug
When hitting breakpoint via placing "debugger" into source code, and connecting with remote debugger, with sinatra controller and puma web server in local docker container, first time when "debugger" is hit will fail, as described below
For example,
Puma started freshly serving sinatra app in local docker container
33| def some_method_called_via_puma_via_sinatra_controller
=> 34| debugger
35| some logic...
37| end
38|
(rdbg:remote) n
# No sourcefile available for /usr/local/bundle/gems/puma-6.4.2/lib/puma/single.rb
Stop by SIGURG
(rdbg:remote) n
# it looks like it tries to step in code, but in reality context is lost
(rdbg:remote) n
[1, 7] in $(Gem)/rack-2.2.9/lib/rack/file.rb
1| # frozen_string_literal: true
2|
3| require_relative 'files'
4|
=> 5| module Rack
6| File = Files
7| end
(rdbg:remote) c
Thus only way to end to proceed is to hit "continue", since control flow has jumped into some odd place, and now, after this failure when doing same request again, debugger works as espected (i.e. does not hit this "SIGURG" which seems to break thing).
Makes usage rather irritating since after every modify of code (and restart of web server thus), have to first hit debugger "cold", and failing, and hitting continue, and now it seems to be "hot", and can actually succeed.
To Reproduce
- Local docker container
- running sinatra app with puma on it
- setting up remote debugger
- adding breakpoint via placing "debugger" into code
- launching app on container
- performing some request hitting "debugger" put in code
- connect remote debugger to process
=> fails on first time, if hitting continue, and retrying request it works as expected
Expected behavior
It would not fail on first time, since it makes debugging few cases difficult.
Additional context
Issue has been there for a while, i.e. it has had this failure always for me with this debug gem
- Langage dominant
- Ruby
- Étoiles
- 1.3k
- Forks
- 146
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de ruby/debug
-
Difficulté 3/5 1-2 jours Accessibilité débutants 68/100
-
Support exceptionOptions in setExceptionBreakpoints to catch arbitrary exception classes via DAP Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 55/100
-
Difficulté 3/5 1-2 jours Accessibilité débutants 45/100
-
Difficulté 4/5 3-5 jours Accessibilité débutants 52/100
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
Toutes les issues de ruby/debug
Issues similaires
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
-
バグ
Difficulté 1/5 Moins d'une heure Accessibilité débutants 92/100
-
Version bump for OpenVox 9 Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
voxpupuli/puppet-epel#186 · 1 commentaire ·
-
external_created_at is no longer used for the message timestamp since the new message UI (v4.4.0) OuverteBug Frontend
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100