0

UPDATE 2:

Nevermind, figured it out, in netbeans I had an extra ) in tools > options > general > web browser > edit > arguments was -remote {url}), so I changed it to -remote {url}.

I now have netbeans debugging php on my new laptop.

UPDATE 1:

I've been comparing my old laptop with my new laptop as debugging works on my old laptop. The only difference I have seen is the url in the browser when I click debug.

Old laptop: http://localhost/PhpProject1/index.php?XDEBUG_SESSION_START=netbeans-xdebug

New laptop: http://localhost/PhpProject1/index.php?XDEBUG_SESSION_START=netbeans-xdebug)

When I remove the ending ) from the new laptop url manually, debugging starts to work... Why does the new laptop setup have an ')' at the end and the old setup doesn't?

ORIGINAL QUESTION:

I'm trying to configure xdebug for php debugging via netbeans on a localhost. I have tried following a couple of guides, but can't seem to get it to work. I've had it configured on an old laptop, but can't seem to remember how. At the moment, when I add a breakpoint and click "debug project", it opens up a browser and displays waiting for connection (netbeans-xdebug). The "step over" and "step into" options are disabled.

How do I resolve this issue?

I have done the following so far:

I have installed lamp, php5-xdebug, and the php plugin for netbeans.

I have the following in /etc/php5/apache2/conf.d/xdebug.ini:

zend_extension=/usr/lib/php5/20090626+lfs/xdebug.so
xdebug.remote_enable=On
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
xdebug.remote_enable=1

I have done service apache2 restart.

I can see that xdebug is enabled with phpinfo();

In netbeans - tools > options > php, I have done the following:

PHP 5 Interpreter = /usr/bin/php
Bebugger Port = 9000
Session ID = netbeans-xdebug
1
  • Please see updated question above. Commented Feb 11, 2012 at 11:08

2 Answers 2

1

Sounds like netbeans is waiting for php to callback. Did you add xdebug to php?

For more info see this article

Sign up to request clarification or add additional context in comments.

2 Comments

Yes, I have installed php5-xdebug and restarted apache. Please see my updated question to see everything I have done.
Looks all okay, though modifying both php.ini and xdebug.ini is a bit double I don't think that's the problem. You might want to try replacing localhost with 127.0.0.1, I have seen cases where localhost resolved to the ipv6 address while the server side was only listening on ipv4.
0

The solution to the problem can be seen in update 2 in the original question, which is:

In netbeans I had an extra ) in tools > options > general > web browser > edit > arguments was -remote {url}), so I changed it to -remote {url}.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.