ruby picture

RCR 203: Make debug mode easier to find

Submitted by robertc (Thu Jan 29 07:01:30 UTC 2004)

Abstract

Make it more obvious from command line how to invoke Ruby debugger.

Problem

It is currently not obvious how to invoke the Ruby debugger. The output of "ruby -h" does not help either. A new user has to go and look up the correct "-r debug" switch (e.g. in Pickaxe book or elswhere and it is not always easy to find).

Proposal

A couple of options are:

  <li>Let "-d" parameter be how to invoke the debugger (which has the advantage 
  of being the same as Perl) - in which case, perhaps "-D" could take over from "-d".</li>
  <li>Add some text to output of "ruby -h" to indicate how to run debugger, for example:</li>

    
  -d  set debugging flags (set $DEBUG to true)
      Note to debug your script use "-rdebug"

  

Analysis

This would remove an (unnecessary) stumbling point for newbies.

Implementation

ruby picture
Comments Current voting
Strongly opposed 0
Opposed 1
Neutral 4
In favor 9
Strongly advocate 0
ruby picture
If you have registered at RCRchive, you may now sign in below. If you have not registered, you may sign up for a username and password. Registering enables you to submit new RCRs, and vote and leave comments on existing RCRs.
Your username:
Your password:

ruby picture

Powered by .