renatov Posted February 23, 2014 Share Posted February 23, 2014 I've found some debugger options for PHP: http://xdebug.org/ http://www.php-debugger.com/dbg/ http://phpdbg.com/ http://dbug.ospinto.com/ http://www.firephp.org/ http://pecl.php.net/package/apd And probably there are more. Do you guys know any of these debuggers? Do you recommend one? What is the best PHP debugger? ps: I'm trying to avoid IDEs at the momment, I would like to use a tool specifically made for debugging. Quote Link to comment https://forums.phpfreaks.com/topic/286430-how-do-you-debug-php-which-debugger-do-you-use/ Share on other sites More sharing options...
renatov Posted February 25, 2014 Author Share Posted February 25, 2014 No one debugs PHP? Quote Link to comment https://forums.phpfreaks.com/topic/286430-how-do-you-debug-php-which-debugger-do-you-use/#findComment-1470617 Share on other sites More sharing options...
kicken Posted February 25, 2014 Share Posted February 25, 2014 No one debugs PHP? Probably more likely is people debug with their IDE's but you said you don't want an IDE so there's not much to say. For step-through logic debugging I use PHPStorm with XDebug. For quicker informational debugging I just scatter some var_dumps around the code. Quote Link to comment https://forums.phpfreaks.com/topic/286430-how-do-you-debug-php-which-debugger-do-you-use/#findComment-1470633 Share on other sites More sharing options...
renatov Posted February 25, 2014 Author Share Posted February 25, 2014 I see, thanks for your reply. Is it possible to use XDebug outside an IDE? Like, via terminal. Quote Link to comment https://forums.phpfreaks.com/topic/286430-how-do-you-debug-php-which-debugger-do-you-use/#findComment-1470651 Share on other sites More sharing options...
gizmola Posted February 25, 2014 Share Posted February 25, 2014 You can hook up xdebug to a lot of different editors. With that said, in order for a debugger to work, you need some sort of editor to load code and display it for step through. Most people are using one of the more popular PHP IDE's (PHPStorm, Eclipse PDT/Zend Studio/ Netbeans, etc) and understanding how xdebug works and what you have to do to utilize it isn't exactly point and click, depending on your development setup. For example, I wrote an article on how to get things setup with Eclipse/PDT some years ago, and it's not the easiest thing in the world to get started with. Take a look at it if you're interested. Quote Link to comment https://forums.phpfreaks.com/topic/286430-how-do-you-debug-php-which-debugger-do-you-use/#findComment-1470683 Share on other sites More sharing options...
renatov Posted February 26, 2014 Author Share Posted February 26, 2014 I find a plugin for Sublime Text that aparently can enable XDebug inside this text editor. What I need for PHP is something like pudb (for Python), take a look at this pudb print screen: http://asmeurersympy.files.wordpress.com/2010/07/screen-shot-2010-07-28-at-12-51-36-pm.png It runs on terminal and it has these features: 1. Execute line by line 2. Show variables values and changes line by line 3. Enable you to navigate between functions stack 4. Can use breakpoints Does XDebug offer this? Is there another debugger for PHP that has these features? Quote Link to comment https://forums.phpfreaks.com/topic/286430-how-do-you-debug-php-which-debugger-do-you-use/#findComment-1470705 Share on other sites More sharing options...
jazzman1 Posted February 26, 2014 Share Posted February 26, 2014 I find XDebug as not very efficient for myself when I follow object oriented design patterns in my code. It could be very powerful and useful if you're coding in procedural way with bad coding design. I am on Netbeans IDE which is absolutely enough for what I want to do and Vi/VIM as command line interface code editor. Quote Link to comment https://forums.phpfreaks.com/topic/286430-how-do-you-debug-php-which-debugger-do-you-use/#findComment-1470706 Share on other sites More sharing options...
kicken Posted February 26, 2014 Share Posted February 26, 2014 Does XDebug offer this? Is there another debugger for PHP that has these features? XDebug itself doesn't provide any kind of interface for actually interacting with the script. That is the job of a third-party client like your text editor or IDE. On the XDebug website they have a list of clients that will provide this functionality. In the list there is: XDebugClient - Standalone Windows client. If you're not using windows, then look at the list for other possible clients. If you feel comfortable with a compiler, the xdebug source package includes a simple client you can compile and use. 1 Quote Link to comment https://forums.phpfreaks.com/topic/286430-how-do-you-debug-php-which-debugger-do-you-use/#findComment-1470711 Share on other sites More sharing options...
renatov Posted February 26, 2014 Author Share Posted February 26, 2014 I find XDebug as not very efficient for myself when I follow object oriented design patterns in my code. It could be very powerful and useful if you're coding in procedural way with bad coding design. I am on Netbeans IDE which is absolutely enough for what I want to do and Vi/VIM as command line interface code editor. Why isn't XDebug suitable for debuggin Object Oriented PHP? XDebug itself doesn't provide any kind of interface for actually interacting with the script. That is the job of a third-party client like your text editor or IDE. On the XDebug website they have a list of clients that will provide this functionality. In the list there is: If you're not using windows, then look at the list for other possible clients. If you feel comfortable with a compiler, the xdebug source package includes a simple client you can compile and use. I'm on Linux and I'm totally comfortable with compiling. How is this simple xdebug client included in the source package? I couldn't find any information about it. Quote Link to comment https://forums.phpfreaks.com/topic/286430-how-do-you-debug-php-which-debugger-do-you-use/#findComment-1470769 Share on other sites More sharing options...
kicken Posted February 26, 2014 Share Posted February 26, 2014 How is this simple xdebug client included in the source package? I couldn't find any information about it. I have no idea, never used it. Compile it and try it, probably wont take more than a few minutes. Quote Link to comment https://forums.phpfreaks.com/topic/286430-how-do-you-debug-php-which-debugger-do-you-use/#findComment-1470777 Share on other sites More sharing options...
gizmola Posted February 26, 2014 Share Posted February 26, 2014 They have a Vim plugin. You can run vim in the terminal. Why not just use that? There are also extensions for chrome, firefox and safari. Quote Link to comment https://forums.phpfreaks.com/topic/286430-how-do-you-debug-php-which-debugger-do-you-use/#findComment-1470825 Share on other sites More sharing options...
jazzman1 Posted February 26, 2014 Share Posted February 26, 2014 Why isn't XDebug suitable for debuggin Object Oriented PHP? B/s the main purpose of using XDebug is to brake down your script into small pieces and fragments of data making it much more easy to debuging. By using OO design patterns, that's guarantee (in most cases) that, that data it's encapsulating within a set of functions designed to ensure that the scripts are used appropriately and in a human readable format. Quote Link to comment https://forums.phpfreaks.com/topic/286430-how-do-you-debug-php-which-debugger-do-you-use/#findComment-1470827 Share on other sites More sharing options...
renatov Posted February 26, 2014 Author Share Posted February 26, 2014 Ok, thanks guys! I'll try using Xdebug with Sublime Text and with VIM to see if it offers what I'm looking for. Quote Link to comment https://forums.phpfreaks.com/topic/286430-how-do-you-debug-php-which-debugger-do-you-use/#findComment-1470837 Share on other sites More sharing options...
trq Posted February 27, 2014 Share Posted February 27, 2014 Why isn't XDebug suitable for debuggin Object Oriented PHP? It is. I use it on a daily basis with a few large Symfony2 based applications. It's a great tool. http://thorpesystems.com/blog/debugging-php-in-vim I'm pretty interested in taking a look at http://phpdbg.com one of these days too as it ships with PHP5.6. Quote Link to comment https://forums.phpfreaks.com/topic/286430-how-do-you-debug-php-which-debugger-do-you-use/#findComment-1470886 Share on other sites More sharing options...
renatov Posted February 27, 2014 Author Share Posted February 27, 2014 It is. I use it on a daily basis with a few large Symfony2 based applications. It's a great tool. http://thorpesystems.com/blog/debugging-php-in-vim I'm pretty interested in taking a look at http://phpdbg.com one of these days too as it ships with PHP5.6. Yes, I was interested in learning phpdbg too since it will be in PHP 5.6 core, but it seems xdebug is better documented, so I'll give it a try at least for now. Thanks for your tutorial! Quote Link to comment https://forums.phpfreaks.com/topic/286430-how-do-you-debug-php-which-debugger-do-you-use/#findComment-1470937 Share on other sites More sharing options...
callpri Posted June 16, 2016 Share Posted June 16, 2016 (edited) I prefer to use free PHP debugger of Codelobster: http://www.codelobster.com/php_debugger.html Edited June 16, 2016 by callpri Quote Link to comment https://forums.phpfreaks.com/topic/286430-how-do-you-debug-php-which-debugger-do-you-use/#findComment-1533718 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.