Home php Xdebug does not work in NetBeans

Xdebug does not work in NetBeans

Author

Date

Category

3 hours spent, so that it earned and in any way.

PHP 5.4

In general, I downloaded PHP 5.4 VC9 TS (32 BIT), I threw in / ext, PHP.ini added:

zend_extension = "c: \ php \ ext \ php_xdebug.dll"
[Xdebug]
; Data for connecting to a remote debugger
xdebug.remote_host = localhost
xdebug.Remote_Port = 9900.
xdebug.remote_Handler = DBGP.
xdebug.Remote_Mode = REQ.
; Start debugging each time at an HTTP request to the server
xdebug.remote_autostart = 1.
; The key so that every time you start the debug session, the Debaager connected to NetBeans and took control teams from it
Xdebug.ideKey = NetBeans-Xdebug

in phpinfo can be seen xdebug. In NetBeans, all settings climbed. I tried everything. Does not want.

What not so maybe?


Answer 1

[xdebug]
zend_extension = \ USR \ LOCAL \ PHP5 \ EXT \ PHP_XDEBUG-2.1.0-5.3-VC6.DLL
xdebug.remote_enable = 1.
xdebug.remote_host = localhost
xdebug.Remote_Port = 9000.
xdebug.remote_Handler = "DBGP"

If PHP 5.2 – you need to use zend_extension_ts instead of zend_extension
In the Nabins settings, specify the PHP to PHP, specify the port of the debugger is the same as in PHP.ini and the session identifier, for example, it is equal to the NetBeans-Xdebug, specify “stop in the first line”.
All these settings are executed in the Service menu / PHP.

If you say that there is a phpinfo xdebug, then the problem is most likely only in the IDE. Try either my config either in your delete lines:

xdebug.remote_mode = REQ; start debugging each time an HTTP request to the xdebug.Remote_Autostart = 1 server; The key to each time when the debug session is started, the Debaager connected to NetBeans and received Xdebug.ideKey control commands from it = NetBeans-Xdebug

Answer 2

In the php.ini of the author of the writer omitted:

xdebug.remote_enable = 1

for PHP 5.4 you need to specify zend_extention regardless of TS, not TS = & GT;
Pruf :

From PHP 5.3 Onwards, You Always Need to Use The Zend_extension php.ini Setting Name, and not zend_extension_ts, Nor Zend_extension_debug.

I managed to start debugging with the built-in PHP 5.4 server

php.exe -s localhost: 3000

But NetBeans 7.1, 7.2 stops at the stop point (BreakPoint) only once, after which it is necessary to restart NetBeans: (.

Configuration: PHP 5.4.4 x86 VC9, Xdebug v2.2.0, Windows 7 x64


Answer 3

For debugging on a remote server, change the .remote_host = localhost to the address for which NetBeans sits.
That. NetBeans is the server on port 9000, and the extensions xdebug on the web server – client
NetBeans Begins to wait for the connection to 9000 immediately after the launch of debugging
Do not forget to check the opening of the port on the firewall


Answer 4

Check that you have PHP-CGI. Xdebug does not want to work without it. NetBeans nothing about him says, but phpstorm would have come aige.


Answer 5

I was closed port 9000.
Opened everything earned

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions