0

I 'm tring to configure xdebug debugger so to to debug with netbeans a script started through a web browser

scenario

mypc localhost
linux ubuntu16.04
apache2.4
php7.2
netbeans8.2 IDE
both script.php and IDE in mypc

xdebug configuration

$ sudo nano /etc/php/7.2/mods-available/xdebug.ini

zend_extension=xdebug.so
;debugger_clients (remote)
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
;xdebug.remote_host=localhost
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_connect_back=On

$ sudo nano /etc/php/7.2/apache2/php.ini

output_buffering=Off

$ sudo netstat -ltnp | grep :9000

empty output

netbeansIDE, Tools > Options > PHP > Debuging >

SessionID: netbeans-xdebug

DebbuggerPort: 9000

Then I created a netbeans project and configured

if I try to execute script in debug mode from netbeans (click Debug>) debugging mode works!!!

instead if I try to execute script in debug mode from web browser then debugging mode doesnt work!!!

http://localhost/path/to/script/index.php?XDEBUG_SESSION_START=netbeans-xdebug

the script is executed without interruptions!!!

I tried also firefox extension "Xdebug Helper for Firefox" installed but without success

1
  • This isn't a WP question, and belongs on stackoverflow Commented Dec 28, 2018 at 20:44

1 Answer 1

1

this is due to the fact that netbeans is not always listening

netbeans listens on port 9000 only after you click on the Debug> button

it's not a big limit that's okay

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

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.