Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Interesting meditation.

I agree that the ease of use of the debugger affects how you program, but IMHO, that ease of use is subject to how familiar and skilled you are with the debugger in question. As I wrote in a recent post, I am very familiar with the perl command line debugger, and I tend to throw code at something and use the debugger to see if it did what I wanted. For me it is other languages where I find the debugger harder to use, and as a consequence do less hacking and debugging, and more thought.

One debug feature I miss though is the way Java debuggers will use the toString() method on an object to summarize it. Many years ago, I was working on a Java project using Eclipse. I noticed that in the Eclipse debugger if you hovered the mouse over a variable, it would use the toString() method on that variable to show you the contents. Obviously this is the correct thing to do for objects that can trivially be converted to strings, but I found that it helped to add the method to all of my own classes so that I could quickly see a summary of any object.

This is a feature I would like to see in Perl. Sometimes it is enough so see the contents of the blessed has that is a class instance, but often there is too much detail. It would be nice if there was a standard way for a perl class to provide a method to view an object, and if all perl debuggers would use that method by default to view the object.


In reply to Re: Rambling about debuggers by chrestomanci
in thread Rambling about debuggers by zek152

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-20 00:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found