I just wanted to see if anyone is aware of any other debuggers capable of stepping through code.
I am aware of xdebug and use it as well as Zend Debugger and other debugging scripts (i've written my own widgets for this already).
However I am looking for a good replacement for step debugging - I've searched and searched but have yet to find anything. Is there anything else out there that can handle this? Surely Zend Debugger isn't our only solution?
I use php_dbg for my PHP step-debugging (comes with PhpED).
Related
is there an extension for dreamweaver cs5 that can support debugging?
I know there are other IDE's like netbeans that can accomplish that task, but I also do html/js and netbeans isn't particularly good for that.
I beg to differ. Those IDEs are, in fact, way better at anything regarding HTML/CSS/JavaScript.
I strongly recommend Zend Studio ($299) or Eclipse PDT (free). NetBeans is supposed to be an excellent IDE as well (just that I'm not familiar with it).
Also, I use Firebug to debug my JavaScripts. It's amazing. Actually, many modern browsers come equipped with JavaScript debugging tools, surprisingly including Internet Explorer (I think only version 8 and above but IE7 might have it too...I don't remember).
I highly recommend Aptana Studio http://aptana.com/
I am using it for along long time and it helped me alot
also use google chrome debugger by clicking F12 it is the best html/js debugger
I recommend you to use TSW WebCoder
In TSW WebCoder go to the Debug menu and select Setup debugging. You will be presented with a wizard, which will walk you though the entire process of setting up debugging on your machine.
I am quite new with development. In some programming language such as python and PHP there is not a good debugger. How is the development going on without a debugger? just put the logs in the source code? Especially for the framework developers, how do they test their codes?
Thank you very much.
-Stefan-
Your answer concerning the debugging in Python is truly nonsense. Python has a reasonable "pdb" debugger which is useful since years. Apart from that you can have a powerful IDE as WingIDE giving you all debugging and inspection power you need. Making such wild claims about Python is not appropriate. That's why this question deserves a clear downvote.
You don't seem to have looked around before coming to your conclusion. I've worked with two excellent debuggers for PHP. Xdebug and ZendDebug. If you have an IDE like Eclipse or NetBeans (both free), it's super easy to debug your app. Just click on the debug menu button :)
Xdebug : http://www.xdebug.org/
Zend Debug : http://www.zend.com/en/community/pdt
Eclipse PDT : http://www.eclipse.org/pdt/
Netbeans : http://netbeans.org/
Python has a debugger: pdb. If you use Werkzeug, then you can also access each frame of a stack trace and debug there on an error
I am not a python developer, but in case of PHP,we do have a debugger. Setting it up and getting to work with it might not be as easy as C# (with VS) or other programming languages. PHP itself is developing and becoming better.
Putting logs is very important and good way to debug. You could also have some print statements, for debugging. Apart from that, you can make use of PHPeclipse IDE and use the debugger. This will help you create breakpoints etc..
You could also setup error reporting in PHP.
Refer to this article for setting up you development environment.
python -m pdb foo.py
And even without using that, usually you get detailed tracebacks when an error happens so many people don't know about pdb because they can just read the error message containing everything they ever wanted to know. It's not like C where it just goes boom and says "Segmentation fault" and leaves you with nothing to work on.
I'm working on one application.
I am using Eclipse php Helios IDE for developing php application.
I wanted to know below things related to this IDE, so that i can implement PHP application instantly as well as very efficiently :
1) How to do remote debugging using Eclipse PHP Helios IDE
2) What is the pros and cons of xdebug and zend debugger
3) Which debugger should we use from xdebug, zend debugger.
4) Is there any other debugger available apart from above two mentioned.
Below links i refered for above mentioned debugger.
1) http://devzone.zend.com/article/2930-Debugging-PHP-applications-with-xdebug
2) http://www.eclipse.org/pdt/documents/XDebugGuideForPDT2.0.pdf
3) http://www.xdebug.org/
I am not getting exact information in above URL's,
as I mentioned specific query above those are needed.
Is anyone know any reference, please suggest me.
Thanks !!
-Pravin
I use the Galileo release, rather than the later Helios release, but I suspect they're very similar in this regard...
The answers to your questions would fill quite a reasonable chapter in a book, so instead I'll point you towards some excellent links on the topics;
2) This article is a great post on the pro's and con's of each with Eclipse; Eclipse debugging with Xdebug and Zend Debugger comparison. Personally I always use xdebug since it has additional features I like, and as I don't use Zend I am not interested in any integration benefits it may offer.
3 + 1) However, there's nothing to stop you installing both and switching between them using different "server setup" configurations inside Eclipse. This post shows you how to set them up on different ports to allow this; Debugging PHP using Eclipse and PDT
There is a small catch (to either debuggers) in that if you use apache mod_rewrite (or similar) for pretty URLs, you have to be really careful to ensure the rule still passes the debug parameter as a GET value in the URL. I'm not personally aware of any way around this (e.g. via cookies).
4) Not that I'm aware of under Eclipse.
Happy reading....
Step by step Debug process using XDebug and Eclipse Helios . Hope it helps.
Which is the best way to debug an PHP application as we can debug ASP.NET application with Visual Studio ?
I'm using the IDE Eclipse PDT, which can use the PHP extension Xdebug to provide debugging functionnalities, kind of the same way as Visual Studio (a bit less powerful, maybe), which gives you the ability to do things like :
step by step
step in / out of functions / methods
see the content of variables
have a stack trace showing where you are
That's really nice to debug big programs -- especially ones you didn't write, to understand how they work (or don't ^^ )
It can also use the extension "zend debugger" ; but I've never tried this one.
Even without using a debugger like the one provided by PDT, Xdebug is a nice extension to have on a development server : it gives nice stack traces when there's an error/exception, it allows you to get nice-looking var_dump's output, ...
It can also be used to get profiling data, which you can visualize with tools like KCacheGrind, WinCacheGrind, or Webgrind.
But note it is hurting performance badly, so it definitly should not be installed on a production server !
PHP Console is good if you want to debug WEB 2.0 (AJAX) web-projects.
PHPEd is great for this, but you have to pay for it.
xdebug works, but you have to install it on the server. I haven't used it, but it seems to have a good reputation.
Some IDEs (Aptana/Eclipse + PHP springs to mind) then can interface with xdebug.
XDebug with Eclipse PDT is the best I've seen. Here is a tutorial on setting this up:
http://devzone.zend.com/article/2930-Debugging-PHP-applications-with-xdebug
NetBeans also has debug capabilities. From the website:
You can debug scripts and web pages, either locally or remotely. The NetBeans PHP debugger integration allows you to map server paths to local paths to enable remote debugging.
I use the Zend debugger and after trouble getting it working (it was a remote setup with he server and the development machine both virtual!) - it made a huge difference to my development efficiency. If you are converting from Visual Studio you will find quite a few things different and even difficult. It is worth sticking with it and mastering howewever - I can now set breakpoints in arbitary pages and navigate to them just like the user, stop and examine locals etc and then step through what happens - put simply now I can find bugs whereas without it I was guessing. Also see Developing with PHP and Eclipse (Galileo) which I found helpful.
PHP storm is a good one from JetBrains.
When Xdebug is installed/enabled, standard PHP errors (when set to display in the browser) are replaced with more informative messages that include stack traces for each. Also, I've noticed that it also seems to improve output in other areas such as the var_dump() function, formatting/color-coding the output to make it more readable.
Are there any 3rd party packages that offer similar functionality? I tend to prefer using Zend Debugger for debugging and would love to find something like this that doesn't depend on Xdebug. Certainly I could write my own error handler, a custom var_dump() function, etc., but I would love to find something that transparently integrates itself into PHP the way Xdebug's functionality does.
Edit: I should emphasize that I'm not looking for a debugger, but for the "extras" that Xdebug offers.
As for your debugging you'll only find access through PHP extensions, regardless of what IDE you are using.
Xdebug is the most popular due to it's extra features, beyond that of what you've even described. Xdebug will do profiling (tracing) into the valgrind format that you can use programs like Kcachegrind and wincachegrind to evaluate.
Your only other real alternative to the debugging facilities Xdebug provides is Zend Debugger which is a part of the Zend Platform (again available as an extension).
As for the replacements, you won't find any other extensions that do the var_dump and error reporting replacements. And especially won't find (beyond Zend Debugger) a debugging protocol, and definitely won't find any other extension that does profiling.
dBug offers quite a nice replacement for print_r:
http://dbug.ospinto.com/
Try NuSphere's PHP IDE. It has an integrated debugger also, and you can get a demo version free if you like.
http://www.nusphere.com/
Shameless plug of my own var_dump alternative:
http://raveren.github.io/kint/
Screenshot:
(source: github.io)