https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112021-05-14T15:15:51ZRuby Issue Tracking SystemRuby master - Feature #17863: rewrite lib/debug.rb with latest APIhttps://bugs.ruby-lang.org/issues/17863?journal_id=919662021-05-14T15:15:51Zbyroot (Jean Boussier)byroot@ruby-lang.org
<ul></ul><p>I tried it with our app, and it crashes weirdly, maybe because of <code>Thread.report_on_exception = true</code>?</p>
<pre><code>(rdbg) c
#<Thread:0x00007fa3421f4630 ~/.gem/ruby/3.0.1/gems/debug-1.0.0.beta3/lib/debug/session.rb:78 run> terminated with exception (report_on_exception is true):
~/.gem/ruby/3.0.1/gems/debug-1.0.0.beta3/lib/debug/source_repository.rb:13:in `read': No such file or directory @ rb_sysopen - eval (Errno::ENOENT)
from ~/.gem/ruby/3.0.1/gems/debug-1.0.0.beta3/lib/debug/source_repository.rb:13:in `add'
from ~/.gem/ruby/3.0.1/gems/debug-1.0.0.beta3/lib/debug/session.rb:825:in `on_load'
from ~/.gem/ruby/3.0.1/gems/debug-1.0.0.beta3/lib/debug/session.rb:88:in `block in initialize'
["~/.gem/ruby/3.0.1/gems/debug-1.0.0.beta3/lib/debug/thread_client.rb",
599,
#<Errno::ENOENT: No such file or directory @ rb_sysopen - eval>,
["~/.gem/ruby/3.0.1/gems/debug-1.0.0.beta3/lib/debug/source_repository.rb:13:in `read'",
"~/.gem/ruby/3.0.1/gems/debug-1.0.0.beta3/lib/debug/source_repository.rb:13:in `add'",
"~/.gem/ruby/3.0.1/gems/debug-1.0.0.beta3/lib/debug/session.rb:825:in `on_load'",
"~/.gem/ruby/3.0.1/gems/debug-1.0.0.beta3/lib/debug/session.rb:88:in `block in initialize'"]]
~/.gem/ruby/3.0.1/gems/debug-1.0.0.beta3/lib/debug/source_repository.rb:13:in `read': No such file or directory @ rb_sysopen - eval (Errno::ENOENT)
from ~/.gem/ruby/3.0.1/gems/debug-1.0.0.beta3/lib/debug/source_repository.rb:13:in `add'
from ~/.gem/ruby/3.0.1/gems/debug-1.0.0.beta3/lib/debug/session.rb:825:in `on_load'
from ~/.gem/ruby/3.0.1/gems/debug-1.0.0.beta3/lib/debug/session.rb:88:in `block in initialize'
</code></pre> Ruby master - Feature #17863: rewrite lib/debug.rb with latest APIhttps://bugs.ruby-lang.org/issues/17863?journal_id=919692021-05-14T17:59:33ZEregon (Benoit Daloze)
<ul></ul><blockquote>
<p><code>binding.bp</code></p>
</blockquote>
<p>What does <code>bp</code> mean? It seems hard to guess. Why not <code>binding.debugger</code> or <code>binding.debug</code> ?</p> Ruby master - Feature #17863: rewrite lib/debug.rb with latest APIhttps://bugs.ruby-lang.org/issues/17863?journal_id=919702021-05-14T18:07:45Zbyroot (Jean Boussier)byroot@ruby-lang.org
<ul></ul><p>"Break Point" I presume. But yes, my 2 cents of feedback is the same. Might just be habit, but I had a hard time remembering it just during my 10 minutes session of trying the gem.</p>
<p>I'm very used to <code>Kernel#debugger</code> / <code>Kernel#byebug</code>.</p>
<p>Also on another note I figured the bug above: <a href="https://github.com/ruby/debug/pull/10" class="external">https://github.com/ruby/debug/pull/10</a></p> Ruby master - Feature #17863: rewrite lib/debug.rb with latest APIhttps://bugs.ruby-lang.org/issues/17863?journal_id=922792021-05-31T02:42:49Zko1 (Koichi Sasada)
<ul></ul><p>I want to avoid <code>Kernel#...</code> for compatibility.<br>
If <code>binding.debug</code> makes sense, I prefer it.</p> Ruby master - Feature #17863: rewrite lib/debug.rb with latest APIhttps://bugs.ruby-lang.org/issues/17863?journal_id=922802021-05-31T02:43:34Zko1 (Koichi Sasada)
<ul></ul><p>ko1 (Koichi Sasada) wrote in <a href="#note-4">#note-4</a>:</p>
<blockquote>
<p>I want to avoid <code>Kernel#...</code> for compatibility.<br>
If <code>binding.debug</code> makes sense, I prefer it.</p>
</blockquote>
<p>or both? (<code>#bp</code> and <code>#debug</code>). mame-san said <code>binding</code> is too long and he doesn't want to write it :p</p> Ruby master - Feature #17863: rewrite lib/debug.rb with latest APIhttps://bugs.ruby-lang.org/issues/17863?journal_id=922862021-05-31T11:28:25ZEregon (Benoit Daloze)
<ul></ul><p>I think <code>binding.debug</code> is best. It's not that long to type, and people are already used to e.g. <code>binding.irb/pry</code>.<br>
Too short feels cryptic and easier to get accidentally committed.</p> Ruby master - Feature #17863: rewrite lib/debug.rb with latest APIhttps://bugs.ruby-lang.org/issues/17863?journal_id=948582021-11-24T05:06:20Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li><li><strong>Assignee</strong> set to <i>ko1 (Koichi Sasada)</i></li></ul><p>debug.rb was replaced debug gem at <a href="https://github.com/ruby/ruby/pull/4804" class="external">https://github.com/ruby/ruby/pull/4804</a></p>