Advanced Debugging



  • Of course, real programmers don't use debug tools.

    That's why I love Classic ASP, make an error and you get:

    500 - Internal Server Error

    That'll teach your bad coding practises!!!!

    Of course we have wonderfull DataFlex which does some kind of loop unrolling at Runtime:

    Referenced array out of range
    VDF Error#: 4509 on line: 16522.

    Thank you for providing me with REALLY USEFULL information.... 

     



  • When I was first learning Perl back in the olden days, I didn't understand this commandline or Linux nonsense, all I had was an FTP client and a Web server that would say "500 Internet Server Error" whenever there was a syntax error. So I plugged along, and gained a good habit of compiling often and remembering what I changed.



  • If you're using IE then try disabling 'friendly error messages' to get better information. Also check out the security option in IIS or web server to enable proper debug messages to be shown in the development environment. You can also enable client-side debugging of IIS-hosted ASP content using Microsoft Script Editor (better than the ancient Microsoft Script Debugger). Seems adequate enough debugging support to me.

    Note: 'Useful' is spelt with only a single L



  • You'd rather give a full stack trace to any jackass that forces an exception in your undoubtedly high-quality code? This is the default configuration for a good reason.



  • @bobday said:

    You'd rather give a full stack trace to any jackass that forces an exception in your undoubtedly high-quality code? This is the default configuration for a good reason.

    To be fair, he did say development environment. 



  • Meh, thought that IIS debugging was only for ASP.NET.

    But if that doesn't work! Then... things will happen!

    To the spell-checker police: sowwy foh mah bed anglisch, Im not ferry goed et englishnees. not a native englishian.



  • Some languages have awful support for debugging, and this is doubly so when programming once-removed from the language of choice, such as when writing Javascript on VS when writing a dotNet webapp.  There's no intellisense for a start, and no debug: capability worth using, I still find myself doing alert("if you see then then it worked 1") all over the place.



  • @TheBigYin said:

    I still find myself doing alert("if you see then then it worked 1") all over the place.

    To be fair, that IS a type of debugging, and in my opinion is still one of the better ones. In many of my apps, my first line of defense is to print off important variables at critical points, and only do this new-fangled debugging if that fails.  



  • I like my debug info in a nice little list. Like in VS.

    Seeing all those locals is really cool. And then you can expand and see the state of each object. Isn't that just lovely??

    I want some unit testing to, I don't want to write an ASP page everytime and run it in the Browser to test a function for it's output.

    VS does that nicely with its object bench (to bad they stole it).

     



  • @rbowes said:

    @TheBigYin said:

    I still find myself doing alert("if you see then then it worked 1") all over the place.

    To be fair, that IS a type of debugging, and in my opinion is still one of the better ones. In many of my apps, my first line of defense is to print off important variables at critical points, and only do this new-fangled debugging if that fails.  

    IMO, the main problem with Response.Write debugging is that you have to change the code in order to see what is going on.  That is what makes the newfangled just-in-time debugging features so attractive for me.

    For you classic ASP developers, if opportunity permits, set up a local IIS instance on your development machine and run your code on it before deploying it anywhere.  You will find that getting remote debugging to work in classic ASP is a chore, but debugging a local IIS instance is typically a breeze.  Just set a breakpoint in visual studio, hit F5, click around on the website until execution reaches your code.  Whala, you have the debugging eutopia that the previous poster described :)

     



  • @TheBigYin said:

    ==========================
    10 PRINT "HELLO ";
    20 GOTO 10;

     What language uses line numbers and semi-colon line terminators?



  • To be fair, only the one on the print line is required, since it means 'no newline'.  It's C64 BASIC v2 familiar to most people born in the 60s or 70s who didn't like rubber keyboards.

    Thanks for pointing out my WTF, I'll change it immediately!

     



  • @Ice^^Heat said:


    on line: 16522.

    Ugh.. I hope this is some kind of auto generated code.



  • @bobday said:

    To be fair, he did say development environment. 

    The point remains though that IIS doesn't know that it's a development environment unless you tell it somehow - in this case, by enabling stack trace output to the error page. The default option settings have to be the most secure...


Log in to reply