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

Re: RFC: debugger_trainer

by davies (Parson)
on Dec 25, 2012 at 12:14 UTC ( #1010266=note: print w/replies, xml ) Need Help??

in reply to RFC: debugger_trainer

++ for the idea. I'm sorry to say that I don't think that this is the way to implement it, but as you seem to be saying that this is a work in progress, it may well be that you plan to expand it to something I would find helpful.

I've never tried using the debugger. Like the anonymonk above, what I write is so simple that I can sort out my bugs with print statements. But I've heard nice things said about the debugger, so I'd like to get started. This is the first difficulty I have - I can see nothing telling me how to invoke the debugger, something I don't know how to do.

You then give a number of debugger commands to explore. I can see nothing indicating what they are supposed to do and so cannot imagine how to explore them. Feigning ignorance, I cannot see any need to debug natural logarithms, not that I ever use them. As far as strings are concerned (and I'm not feigning ignorance here - that's clearly what "expr" means if you read perldoc -f split), I don't see what debugging would be needed. Again without feigning ignorance, I'm totally at a loss as to what "events" might be. This may be because my viewpoint is coloured by Excel VBA, where event handling is a powerful feature. I strongly believe that all three terms need expansion.

I'm not clear what your code is supposed to do. Running it, it seems to work, so it's not clear to me what the bug(s) is/are that I'm supposed to find. I would find it very useful to have code (possibly a series of small bits of code) with a bug that I could identify (if only from reading the accompanying text), information on how to invoke the debugger and something telling me how to choose the command that is most likely to help me find the problem.

If, as I said in my first paragraph, this is work in progress and you are looking for advice on whether to continue, then I for one would love you to. If this is supposed to be an accompaniment to the official docs, it would help to specify which ones and at what point(s) to refer to them or this.

Re-reading what I have written, it seems to be very critical. I hope it's constructive criticism, as I would love to see a debugger tutorial. If I've failed, all I can do is apologise and hope that I haven't put you off.


John Davies

Replies are listed 'Best First'.
Re^2: RFC: debugger_trainer
by ww (Bishop) on Dec 25, 2012 at 13:21 UTC
    Re John's comment immediately preceding, "it's not clear to me what the bug(s) is/are ...."

    Sorry, that's rooted in my inadequate explanation. There are some infelicities, but not, TTBOMK, any bugs to find.

    Rather, as a candidate for first script in a series, this one is aimed solely at familiarizing the user with the use of w(atch), l(ist) and company.

    But you're absolutely correct that any such effort should include some simple scripts with obvious bugs and some more with more subtle problems... albeit, all in the class that is discoverable with straightforward use of the distribution's debugger. (I say "straightforward" because I'm quite sure some of our most skilled colleagues make the debugger jump thru hoops and do discovery-acrobatics well beyond the little I've learned.)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1010266]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2017-01-20 12:22 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (174 votes). Check out past polls.