jhsachs Posted May 29, 2012 Share Posted May 29, 2012 Do you use a debugger? If you don't, what debugging tools do you favor, and why? Whether you do or you don't, what's your impression of who uses debuggers and who doesn't? Background I'm working for a small company with a couple of programmers. I think of myself as a programmer, but I've been earning most of my income by other means for the past ten years or so. I'm trying to get back into programming now. I'm feeling somewhat uncomfortable because I expect to use a debugger, and our two "real" programmers never bothered installing one. No one has said anything, but I've got a feeling that they think I need training wheels. I'm wondering what's behind this. Am I just behind the times? (The other two guys are much younger than me. Their parents probably gave them their first personal computers about the time I bought my first house.) Or is this purely a matter of personal style? Quote Link to comment https://forums.phpfreaks.com/topic/263345-who-uses-a-debugger/ Share on other sites More sharing options...
Barand Posted May 29, 2012 Share Posted May 29, 2012 You are in wrong forum for this type of question, however, I have been programming professionally for decades and I consider the ability to step through lines of code and inspect variable values essential when things go pear-shaped - more often than I would like. (I use PHPEd IDE with integrated debugger) Quote Link to comment https://forums.phpfreaks.com/topic/263345-who-uses-a-debugger/#findComment-1349623 Share on other sites More sharing options...
ManiacDan Posted May 29, 2012 Share Posted May 29, 2012 Thread moved to Miscellaneous, for want of a better section. I haven't used a debugger in years. Ajax, soap, and rest kind of make them useless. If you're writing a site where a debugger could come in handy, I don't think any less of you. I just use log files. Some people think they're "hardcore" if they go without a debugger, like driving a car without airbags or something. It's not the mark of a professional to forego debugging, it's the mark of someone who cares more about how he looks than how his code works. Write code however you, personally, can write the best code. Quote Link to comment https://forums.phpfreaks.com/topic/263345-who-uses-a-debugger/#findComment-1349630 Share on other sites More sharing options...
Kays Posted May 29, 2012 Share Posted May 29, 2012 When I need to, I will use it. I don't generally use it for scripting languages though. gdb and Eclipse are the ones I've used. Quote Link to comment https://forums.phpfreaks.com/topic/263345-who-uses-a-debugger/#findComment-1349636 Share on other sites More sharing options...
jhsachs Posted May 29, 2012 Author Share Posted May 29, 2012 Good feedback so far. Dan, I know what Ajax and SOAP are, but I haven't worked with them as a programmer. Can you give me some insight into why they don't play well with debuggers? Quote Link to comment https://forums.phpfreaks.com/topic/263345-who-uses-a-debugger/#findComment-1349670 Share on other sites More sharing options...
gizmola Posted May 29, 2012 Share Posted May 29, 2012 Serverside web development is challenging in that you are typically debugging code that is running on a different machine (the server) and getting it setup is not easy for many people. In some team environments getting debugging setup borders on impossible and so people make due. There are two php debuggers available: xdebug and zend debugger. I only have experience with xdebug, but there is an article i wrote back in 2010 that covers a lot of this territory: http://www.flingbits.com/tutorial/view/xdebug-for-developing-debugging-and-profiling-php. Quote Link to comment https://forums.phpfreaks.com/topic/263345-who-uses-a-debugger/#findComment-1349677 Share on other sites More sharing options...
ManiacDan Posted May 30, 2012 Share Posted May 30, 2012 AJAX and SOAP calls do not generally print human-readable output, and they cannot be linked directly to debuggers because they require custom request formats (not just GET). Quote Link to comment https://forums.phpfreaks.com/topic/263345-who-uses-a-debugger/#findComment-1349716 Share on other sites More sharing options...
jhsachs Posted May 30, 2012 Author Share Posted May 30, 2012 I think I understand -- debuggers don't lend themselves to direct application to the Ajax and SOAP calls themselves. It's not that they interfere with a debugger's usefulness in the other parts of a program. Quote Link to comment https://forums.phpfreaks.com/topic/263345-who-uses-a-debugger/#findComment-1349717 Share on other sites More sharing options...
ManiacDan Posted May 30, 2012 Share Posted May 30, 2012 But for many applications, there is no other part. My current application is 100% ajax based, the only time a debugger would be handy is in the drawing of the first pane and the loading of the JS asset. A previous company was all SOAP based, the only time a debugger would have been handy was in very basic template-level stuff. Quote Link to comment https://forums.phpfreaks.com/topic/263345-who-uses-a-debugger/#findComment-1349774 Share on other sites More sharing options...
jhsachs Posted May 30, 2012 Author Share Posted May 30, 2012 I see. The stuff I'm doing is quite different, at least currently. I'll probably incorporate Ajax into my project at some point, but when I do, it will be in the context of rather complex logic for which the debugger will still be an important tool. Quote Link to comment https://forums.phpfreaks.com/topic/263345-who-uses-a-debugger/#findComment-1349786 Share on other sites More sharing options...
KevinM1 Posted May 30, 2012 Share Posted May 30, 2012 @ManiacDan, very curious about what kinda projects you work on. Are you receiving JSON or something else? Also, do you ever use a client side debugger (Chrome's built-in web tools, Firebug)? They generally let you step through JS, and, at the very least, monitor HTTP requests. Quote Link to comment https://forums.phpfreaks.com/topic/263345-who-uses-a-debugger/#findComment-1349790 Share on other sites More sharing options...
ManiacDan Posted May 30, 2012 Share Posted May 30, 2012 @ManiacDan, very curious about what kinda projects you work on. Are you receiving JSON or something else? Also, do you ever use a client side debugger (Chrome's built-in web tools, Firebug)? They generally let you step through JS, and, at the very least, monitor HTTP requests. It's a customer portal for a payment processor. We're re-writing it to be "web 2.0" at the recommendation of various non-technical people and a terrible design firm. It's all ajax/json based, jquery as the front-end. I use firebug/webTools for basic JS debugging, though not often. The real heavy lifting takes place behind the scenes in Symfony, the JS is just for moving the interface elements around, doing basic validation, etc. For symfony debugging we just dump to the log file and tail it by hand. I do use the network inspector to monitor web requests, but that only really tells me if there was a 500 error. If so, I check the log file on the terminal. Quote Link to comment https://forums.phpfreaks.com/topic/263345-who-uses-a-debugger/#findComment-1349796 Share on other sites More sharing options...
Philip Posted May 30, 2012 Share Posted May 30, 2012 Since I do a lot more JS work, I commonly use debuggers that let me step through the code (such as chrome/IE's dev tools, firebug + omnibug (specific to web analytics.) We also use packet sniffers like Charles proxy / Fiddler2 (my favorite) to inspect the urls / use local files on live sites to test against client sites where we don't have access to upload / push new files. Quote Link to comment https://forums.phpfreaks.com/topic/263345-who-uses-a-debugger/#findComment-1349799 Share on other sites More sharing options...
Doug G Posted May 31, 2012 Share Posted May 31, 2012 Eclipse PDT with zend debugger Quote Link to comment https://forums.phpfreaks.com/topic/263345-who-uses-a-debugger/#findComment-1350172 Share on other sites More sharing options...
yoursurrogategod Posted June 1, 2012 Share Posted June 1, 2012 I've used gdb, Windows Visual Studio debugger and LabVIEW debugger. The question shouldn't be whether one should use a debugger, but why wouldn't you use one when facing a particularly annoying problem? I've shaved hours of banging my head against the wall by just looking at the values while executing my code and _knowing_ for sure what was going on. Quote Link to comment https://forums.phpfreaks.com/topic/263345-who-uses-a-debugger/#findComment-1350312 Share on other sites More sharing options...
alvin567 Posted June 2, 2012 Share Posted June 2, 2012 You can consider using firebug/jquerify to do your debugging work. Quote Link to comment https://forums.phpfreaks.com/topic/263345-who-uses-a-debugger/#findComment-1350587 Share on other sites More sharing options...
RobertP Posted June 2, 2012 Share Posted June 2, 2012 on the server side just make sure you have a good error handler, to catch everything and share nothing. the most i use on the client side is chromes dev console. (however i am starting to think of moving to firefox) Quote Link to comment https://forums.phpfreaks.com/topic/263345-who-uses-a-debugger/#findComment-1350676 Share on other sites More sharing options...
gizmola Posted June 2, 2012 Share Posted June 2, 2012 Since I do a lot more JS work, I commonly use debuggers that let me step through the code (such as chrome/IE's dev tools, firebug + omnibug (specific to web analytics.) We also use packet sniffers like Charles proxy / Fiddler2 (my favorite) to inspect the urls / use local files on live sites to test against client sites where we don't have access to upload / push new files. Amen to Fiddler2. That's a tool too few people seem to know about, but then again, these days, if you're doing Webdev on a Windows machine, you're not cool Quote Link to comment https://forums.phpfreaks.com/topic/263345-who-uses-a-debugger/#findComment-1350689 Share on other sites More sharing options...
alvin567 Posted June 6, 2012 Share Posted June 6, 2012 How can i use a debugger,like xdebug? Quote Link to comment https://forums.phpfreaks.com/topic/263345-who-uses-a-debugger/#findComment-1351552 Share on other sites More sharing options...
trq Posted June 6, 2012 Share Posted June 6, 2012 How can i use a debugger,like xdebug? You could start by reading this link provided in this very thread. http://www.phpfreaks.com/forums/index.php?topic=360130.msg1703083#msg1703083 Quote Link to comment https://forums.phpfreaks.com/topic/263345-who-uses-a-debugger/#findComment-1351556 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.