views:

7371

answers:

9

I have recently tried to get going with Netbeans 6.5 after it rated so highly in the IDE review by Smashing magazine. http://www.smashingmagazine.com/2009/02/11/the-big-php-ides-test-why-use-oneand-which-to-choose/

My main reason for switching from Notepad++ is that I'd like to be able to debug my code and set through it.

I have followed the instructions about how to install xdebug from both the vendor http://xdebug.org/ and the netbeans web site. http://www.netbeans.org/kb/docs/php/debugging.html#gettingReady but to no avail.

How is it done, has anyone else got debugging working in netbeans?

(My setup is: Windows XP, Wamp server 2.0, PHP 5, Netbeans 6.5.1)

A: 

hm, for me, the netbeans was the first ide that php debugging was working out of the box.

Does the xdebug show in phpinfo? if it does it should work with default settings. the only one that is needed is:

xdebug.remote_enable=on

So if this isn't enabled put it in your php.ini file, restart apache, and debugging should work.

If not, you will have to supply more info for me to help you.

sy

deresh
+1  A: 

I have since found that WAMP, when installed with Mod_rewrite and cURL cannot cope with Xdebug.

It is a known error and crashes everytime.

http://phphints.wordpress.com/2008/10/24/wampserver-phpini-settings-for-use-with-xdebugdll-pear-and-silverstripe-cms-framework/

Unfortunately, I am using these 2 libraries too.

Jon Winstanley
A: 

It's not a know problem that xdebug gives issues with curl or mod_rewrite. The only issues I am aware of is with Xdebug on Vista.

Derick Rethans
A: 

If you're having the problem in which Apache decides to crash whenever you run the debugger (which is what I had and is extremely annoying). I'm fairly sure I re-installed xampp and re-set up xdebug. I think the problem was to do with the zend-debugger being set up weirdly in php.ini and me not modifying the correct php.ini.

Eventually after re-installing and resetting it up I got it working fine.

I now run a dev release of Netbeans which has networked debugging with xdebug so we run it all off of our development server and it works a treat.

Good Luck, There isn't particularly any decent documentation on how to set up xdebug with net beans.

Joel
A: 

It's important to add this line in the php.ini:

xdebug.idekey="netbeans-xdebug"

Note: In NetBeans go to Settings and look where the xdebug stuff is set up. Look for that Session ID. In my case it was netbeans-xdebug.

openfrog
A: 

I have had occasional issues with NetBeans and XDebug which have been down to a Watch statement being in place which does not relate to the code being debugged.

In this case the debugger just fails with a Socket Exception.

Remove any watches if you find this is causing your issue. Generally though I have found XDebug to be extremely handy!

I do realise however that this may not relate to the issue you have here but it's worth being aware of.

Ian Lewis
A: 

I found out that in Netbeans you need to set the webroot path in the projects to app/webroot. If you do this debugging works flawlessly.

RaScoop
A: 

I followed all the steps in the documentations found at different sites on the internet. My php settings seem fine. If I run debugclient it does get in touch with my browser and receives info for debugging. When I try debugging with netbeans, like the start of this forum thread, netbeans just sits there waiting for a connection...

Has anyone already found the solution to this?

Onno
A: 

When I try debugging with netbeans, like the start of this forum thread, netbeans just sits there waiting for a connection...

I have the same problem. php.ini is set up according to instructions.

taydeko