pwired Posted September 29, 2014 Share Posted September 29, 2014 I know there is FirePHP, Xdebug, debug bar in composer but what are you guys using when debugging php ? Link to comment Share on other sites More sharing options...
kongondo Posted September 29, 2014 Share Posted September 29, 2014 exit print_r var_dump gettype ProcessWire 9 Link to comment Share on other sites More sharing options...
horst Posted September 29, 2014 Share Posted September 29, 2014 https://processwire.com/talk/topic/4550-debugging-tips/ 2 Link to comment Share on other sites More sharing options...
diogo Posted September 29, 2014 Share Posted September 29, 2014 Simple but nice for small debuggings https://chrome.google.com/webstore/detail/vardumpling/aikblkmigebodlhkdepmfmgdgmbokkdn?hl=en&gl=US 3 Link to comment Share on other sites More sharing options...
LostKobrakai Posted September 29, 2014 Share Posted September 29, 2014 Simple but nice for small debuggings https://chrome.google.com/webstore/detail/vardumpling/aikblkmigebodlhkdepmfmgdgmbokkdn?hl=en&gl=US yeah, no <pre> warping anymore Link to comment Share on other sites More sharing options...
hdesigns Posted September 29, 2014 Share Posted September 29, 2014 I use NetBeans in combination with xdebug. Works like a charm! You can dive into object variables and see their internal status or just step through your code just like with any other real world debugger (as I'm used to have in java and/or .net). It's funny: A couple of years ago I asked the same question in the official joomla forum and no one answered for a long time (and after some months there were like 2 replies) and here there are 4 replies in less than 2 hours... 2 Link to comment Share on other sites More sharing options...
Nico Knoll Posted September 29, 2014 Share Posted September 29, 2014 Same as kongondo 1 Link to comment Share on other sites More sharing options...
diogo Posted September 29, 2014 Share Posted September 29, 2014 I use NetBeans in combination with xdebug. Works like a charm! You can dive into object variables and see their internal status or just step through your code just like with any other real world debugger (as I'm used to have in java and/or .net). It's funny: A couple of years ago I asked the same question in the official joomla forum and no one answered for a long time (and after some months there were like 2 replies) and here there are 4 replies in less than 2 hours... Wait until Soma reads this and you'll have one more 1 Link to comment Share on other sites More sharing options...
jordanlev Posted September 29, 2014 Share Posted September 29, 2014 I think having a step debugger is incredibly valuable, especially when trying to understand a system you didn't create yourself (e.g. ProcessWire, or any CMS or framework you're building on top of). I develop on a mac, and my preferred solution is xdebug (which comes preinstalled on MAMP these days) with the very light-weight and simple "MacGDBp" app (which is like the GUI front-end for xdebug): https://www.bluestatic.org/blog/category/macgdbp/ 1 Link to comment Share on other sites More sharing options...
netcarver Posted September 29, 2014 Share Posted September 29, 2014 If you want to move beyond just scattering echo or print_r through your code then the first step is getting xdebug installed in your PHP layer. After that you can use any debugger that supports it - several have already been mentioned. Personally, I like to use the vdebug extension inside vim. Single steps very well, you can set breakpoints on lines or conditions and inspect local and global variables as needed. Link to comment Share on other sites More sharing options...
Gazley Posted September 29, 2014 Share Posted September 29, 2014 I use Xdebug and PHP storm. Debugging is very easy using these tools and of course, you still have the regular PHP output capabilities as well. Despite what has been said in this thread, I find being able to step through code incredibly useful so I would always use a real debugger over and above temporary logging. Using var_dump and so on means adding code and then having to remove it when you're done. Just adding a breakpoint is an easy way to work and nothing to change later, unless of course, you find your bug! Hope this helps. 1 Link to comment Share on other sites More sharing options...
Recommended Posts