PHP/Javascript/HTML Debug Techniques Primer Tutorial

PHP/Javascript/HTML Debug Techniques Primer Tutorial

PHP/Javascript/HTML Debug Techniques Primer Tutorial

Doubt there are many programmers out there that have not been baffled (for hours) about what turns out to be the stupidest mistakes, on occasions. When the mistake is done in language tools of the web like PHP and Javascript and HTML there may be no IDE to help you out like with the great debugging (step through and over) systems of Visual Studio and Xcode and the Microsoft Office VBA functionality. Often find myself in a state of denial thinking I’ll see the problem sooner than it comes, but often it is better to be logical, and this often depends, for success, on the frame of your mind. So the great I.T. community comes to the fore again with some good tools online or otherwise, and will show you today, in this tutorial, the use of PHP lint (via command line php -l [php-file-to-check.php]), Javascript lint, a Javascript online syntax checker and W3C XHTML 1.0 validator. These debugging tools are good for code in isolation, like the sort of thing you try to prove with unit testing, so the other extremely useful tool is the Web Browser’s View Source used a lot here too. Another resource, of course, are the various error logs that are created on the web server. Often PHP errors will turn up in the Apache error log.

Enjoy the tutorial, as we depart with Wikipedia’s view of debugging.

Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a computer program or a piece of electronic hardware, thus making it behave as expected. Debugging tends to be harder when various subsystems are tightly coupled, as changes in one may cause bugs to emerge in another. Many books have been written about debugging (see below: Further reading), as it involves numerous aspects, including interactive debugging, control flow, integration testing, log files, monitoring (application, system), memory dumps, profiling, Statistical Process Control, and special design tactics to improve detection while simplifying changes.

Just one last thing is that languages with try/catch like PHP and Javascript help you with the avoidance of bugs in the first place perhaps, though am sure there would be a school of thought that you should minimize the use of try/catch (for i/o (input/output) the contrary argument is hard to sustain, methinks … youthunk?).

For HTML debugging have also found Free Online HTML Validator – FreeFormatter.com to be very useful.

If this was interesting you may be interested in this too.

This entry was posted in eLearning, Software, Tutorials and tagged , , , , , , , , . Bookmark the permalink.

17 Responses to PHP/Javascript/HTML Debug Techniques Primer Tutorial

  1. great put up, very informative. I’m wondering why the opposite specialists of this sector don’t understand this. You must proceed your writing. I am confident, you have a great readers’ base already!

  2. It‘¦s really a nice and useful piece of info. I‘¦m glad that you just shared this helpful info with us. Please keep us up to date like this. Thank you for sharing.

  3. I think other web-site proprietors should take this website as an model, very clean and great user genial style and design, as well as the content. You are an expert in this topic!

  4. Great write-up, I‘¦m normal visitor of one‘¦s blog, maintain up the excellent operate, and It is going to be a regular visitor for a lengthy time.

  5. I’m still learning from you, while I’m trying to reach my goals. I certainly liked reading all that is written on your site.Keep the aarticles coming. I enjoyed it!

  6. Nice weblog right here podiscsd! Also your site a lot up fast! What web host are you using? Can I get your affiliate link on your host? I want my web site loaded up as quickly as yours lol

  7. There is noticeably a good deal to know about this. I believe you created some good points in capabilities also.

  8. Keep all the articles coming. I love reading by means of your things. Cheers.

  9. I believe this web site has some really fantastic data for everyone : D.

  10. Simply wanna admit that this is very helpful , Thanks for taking your time to write this.

  11. health says:

    What i do not understood is in truth how you’re not really much more neatly-liked than you might be now. You’re so intelligent. You understand thus significantly relating to this matter, made me individually imagine it from so many various angles. Its like men and women aren’t fascinated except it‘¦s something to accomplish with Girl gaga! Your individual stuffs nice. Always take care of it up!

  12. Ray Doshi says:

    I needed to compose you the tiny observation to help give many thanks again for all the amazing tricks you’ve discussed at this time. This is really tremendously generous of you to deliver extensively just what a number of us could have sold as an electronic book to make some profit for their own end, primarily considering the fact that you might well have tried it in case you desired. Those things as well served like a good way to fully grasp other people online have similar dream similar to mine to understand a whole lot more with regard to this problem. I am sure there are several more pleasant instances up front for those who view your site.

  13. Normally I do not learn article on blogs, but I would like to say that this write-up very compelled me to try and do it! Your writing taste has been amazed me. Thank you, quite great post.

  14. Darius Sahm says:

    Very interesting info!Perfect just what I was looking for!

  15. I think this website holds some very excellent info for everyone :D. “I like work it fascinates me. I can sit and look at it for hours.” by Jerome K. Jerome.

  16. Whats up are using WordPress for your site platform? I’m new to the blog
    world but I’m trying to get started and set up my own. Do you
    require any coding knowledge to make your own blog? Any help
    would be greatly appreciated!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>