Reputation:
I have been trying to set up remote debugging in IntelliJ Idea and Xdebug for several days in a row with no success.
I have a Windows 7 host and VM VirtualBox with Windows XP as a web server. It has WampServer installed with Apache, PHP and Xdebug.
Xdebug is configured correctly:
Summary
Xdebug installed: 2.2.3
Server API: Apache 2.0 Handler
Windows: yes - Compiler: MS VC9 - Architecture: x86
Zend Server: no
PHP Version: 5.4.16
Zend API nr: 220100525
PHP API nr: 20100525
Debug Build: no
Thread Safe Build: yes
Configuration File Path: C:\WINDOWS
Configuration File: C:\wamp\bin\apache\apache2.4.4\bin\php.ini
Extensions directory: c:\wamp\bin\php\php5.4.16\ext
Web server and PHP work Ok, without any issues.
Here are my steps of setting up the remote debugging in Intellij:
File->Settings->PHP->Servers
Run/Debug Configurations:
php.ini xdebug section:
[Xdebug]
zend_extension = "c:\wamp\bin\php\php5.4.16\zend_ext\php_xdebug-2.2.3-5.4-vc9.dll"
;xdebug.profiler_enable=1
xdebug.profiler_output_dir="c:\wamp\tmp"
xdebug.remote_autostart=1
xdebug.remote_enable=1
;xdebug.remote_handler=dbgp
;xdebug.remote_mode=req
xdebug.remote_port=9000
xdebug.remote_host=192.168.56.1
;xdebug.idekey="intellij"
Those line commented are ones I already tried to turn on/off without success.
When I start debugging session, from IntelliJ, it opens a browser with address "http://192.168.56.101/index.php?XDEBUG_SESSION_START=some id"
, while debugger starts waiting on the same id.
What I have already tried: - disable / tune firewalls - change the default listening port - set up "Remote debug configuration" template with manual starting debugger from browser and many others.
I used a sniffer to make sure that my host receives something on port 9000: it indeed receives 62 bytes from the server:
but without data. Is this normal? Please give me a hint where to dig further?
Thank you all in advance.
Upvotes: 4
Views: 5714
Reputation: 11
in intelliJ IDEA install xdebug 1st correct settings for xdebug on intelliJ IDEA on windows wamp is look for php.ini file find xdebug at bottom,after zend extension paste following and then restart wamp server it working for me very well
[xdebug]
xdebug.remote_enable = On
xdebug.profiler_enable = On
xdebug.profiler_enable_trigger = On
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "c:/wamp/tmp"
xdebug.show_local_vars=0
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9001
xdebug.remote_handler=dbgp
xdebug.remote_autostart=0
Upvotes: 0
Reputation:
The problem has finally been solved by reinstalling the web server, using XAMPP instead of WampServer. Of course it did not give me the exact answer what caused the previous configuration failure, but anyway, now it works, and I am quite satisfied with that.
Upvotes: 1