debugger could use better message when --debug is not set
---------------------------------------------------------

                 Key: JRUBY-4935
                 URL: http://jira.codehaus.org/browse/JRUBY-4935
             Project: JRuby
          Issue Type: Improvement
         Environment: 1.5.1 xp
            Reporter: Roger Pack
            Assignee: Thomas E Enebo


Currently if you have

require 'ruby-debug'
debugger

and do *not* pass it the --debug flag, it outputs a warning (which is good), 
but then forces you to step through the debugger source code itself, ex:


C:\dev\lists\in_transit_lists>\installs\jruby-bin-1.5.1\jruby-1.5.1\bin\jruby 
--debug differ.rb
[7, 16] in differ.rb
   7
   8
   9    unless (line[0] =~ /das_no_apid/)
   10  require 'ruby-debug'
   11  debugger
=> 12      line[0] =~ /dgs:(\d+)/
   13      all_awol << $1
   14    end
   15
   16  }
differ.rb:12
line[0] =~ /dgs:(\d+)/
(rdb:1) exit!

C:\dev\lists\in_transit_lists>\installs\jruby-bin-1.5.1\jruby-1.5.1\bin\jruby 
differ.rb
C:/installs/jruby-bin-1.5.1/jruby-1.5.1/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.3.2-java/lib/ruby-debug-base.rb:214
 warning: tracing (e.g. set_trace_func) will not capture all events without 
--debug flag
[162, 171] in 
C:/installs/jruby-bin-1.5.1/jruby-1.5.1/lib/ruby/gems/1.8/gems/ruby-debug-0.10.3/cli/ruby-debug.rb
   162    # in order to be back in your debugged program rather than the
   163    # debugger. Settings _steps_ to 0 could be useful you want to stop
   164    # right after the last statement in some scope, because the next
   165    # step will take you out of some scope.
   166    def debugger(steps = 1)
=> 167      Debugger.start unless Debugger.started?
   168      Debugger.run_init_script(StringIO.new)
   169      if 0 == steps
   170        Debugger.current_context.stop_frame = 0
   171      else


I'm not sure what would be best to do about this, but it was unexpected.  At 
the least output another warning, I would.
Thanks!
-rp

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to