I did install xampp portable server on USB stick by downloading the zip version from https://sourceforge.net/projects/xampp/files/XAMPP%20Windows/1.8.3/
(out of the question's context I want to tell you that first I tried to install it via the installer but was working only on the PC, which the installation was made, so if you install it I suggest you do it like extracting it from the zip file, so it will work on every PC you plug in the flash drive).
So I have NetBeans 8 which I successfully use to debug PHP when I use the locally installed WAMP server.
I'm trying to debug PHP code that is on the portable XAMPP server but I fail.
php.ini xdebug configuration looks like this:
[XDebug]
zend_extension = "\xampp\php\ext\php_xdebug.dll"
xdebug.idekey = netbeans-xdebug
xdebug.profiler_append = 0
xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "\xampp\tmp\xdebug"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_autostart = 0
xdebug.remote_connect_back = 0
xdebug.remote_host = "127.0.0.1"
xdebug.remote_port = 9000
xdebug.remote_handler = "dbgp"
xdebug.remote_mode = req
xdebug.remote_log = "\xampp\tmp\xdebug\xdebug_remot.log"
xdebug.show_local_vars = 9
xdebug.trace_output_dir = "\xampp\tmp\xdebug"
If someone did this and is this kind to tell me how to do it, it is going to be great.
Thanks
I will share what exactly the problem was.
First I check the result of phpinfo() and I realize that xdebug module is not loaded at all, but the path to the extension was looking pretty right.
Then I changed zend_extension = "\xampp\php\ext\php_xdebug.dll" to zend_extension=php_xdebug.dll and then I was able to debug PHP application hosted on this XAMPP portable server with NetBeans.
Cheers!
Related
NetBeans IDE 8.2 (Build 201705191307)
PHP 5.5.38 (due to legacy application)
Chrome 66.0.3359.170 (Official Build) (64-bit)
In the last few days my NetBeans debug stops working after one debug run and will only debug after I restart NetBeans. I've tried disabling all Chrome extensions other than NetBeans Connector and tested if restarting browser and stack would help but only restarting NetBeans works. It will also freeze up in the middle of a debug.
I have not touched php.ini
This is killing my productivity. Has anyone had this problem and how did you fix it?
UPDATE
I set up Visual Studio Code and debugging works fine so this must be a NetBeans issue.
Unchanged php.ini (same settings that worked last week)
[xdebug]
zend_extension = C:\xampp_php_5.5.38\php\ext\php_xdebug-2.4.1-5.5-vc11.dll
xdebug.idekey = netbeans-xdebug
xdebug.profiler_append = 0
xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:/xampp_php_5.5.38/xdebug"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_autostart = 0
xdebug.remote_connect_back = 0
xdebug.remote_host = 192.168.1.114
xdebug.remote_port = 9000
xdebug.remote_handler = "dbgp"
xdebug.remote_mode = req
xdebug.trace_output_dir = "C:/xampp_php_5.5.38/tmp"
xdebug.remote_log = "c:/xampp/tmp/xdebug/xdebug_remot.log"
xdebug.show_local_vars = 9
xdebug.trace_output_dir = "C:/xampp_php_5.5.38/tmp"
Derp, I 'fixed' it by removing xdebug.remote_autostart=1 from my xebug.ini file, see nginx php-fpm xdebug netbeans can start only one debug session .
I followed this steps, recommended by Xdebug based on phpinfo():
Download php_xdebug-2.4.0rc4-5.6-vc11.dll
Move the downloaded file to C:\xampp\php\ext
Update C:\xampp\php\php.ini and change the line
zend_extension = C:\xampp\php\ext\php_xdebug-2.4.0rc4-5.6-vc11.dll
Restart the web server
I also unchecked the 'ignore external connections through unregistered server configurations in PhpStorm. In PhpStorm port 9000 is configured. This port isn't used by an other application.
In the php.ini file I listed the following configuration:
[XDebug]
zend_extension = C:\xampp\php\ext\php_xdebug-2.4.0rc4-5.6-vc11.dll
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 0
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost"
xdebug.trace_output_dir = "C:\xampp\tmp"
The DLL file exists.
I also enabled the debug functionality in chrome via the xdebug addon.
Which step do I miss?
You're probably going to want to set xdebug.remote_enable = 1 or the remote debugging will be disabled.
Also, set the remote debug port phpStorm is set to use:
xdebug.remote_port=9000 (I'm assuming port 9000, it's the default, but check phpstorm)
To debug every request (if you don't have the chrome plugin for a browser for example) use xdebug.remote_autostart = on
I tried to use netbeans to debug php program. And the xdebug is not working. What I have tried is
Go to http://xdebug.org/wizard.php to analyse my phpinfo() .
I downloaded php_xdebug-2.4.0rc2-5.6-vc11.dll and put it into C:\xampp\php\ext
I also modified php.ini(I am sure it is the correct file) like
zend_extension = "C:\xampp\php\ext\php_xdebug-2.4.0rc2-5.6-vc11.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.remote_port = 9000
xdebug.remote_autostart = 1
xdebug.remote_connect_back = 1
I also checked port 9000. When netbeans does not debug, I enter netstat -ano | find "9000" from cmd. It comes nothing. While I start debuging throuh netbeans, it comes as the picture below
So I thought that the netbeans can interactive with xDebug through port 9000 properly.
The problem might be ip address. So I try to use my ipv4 address(cmd-ipconfig) instead of 127.0.0.1,not working. And also "localhost", not working neither.
I realize that I am working on the university with vpn and maybe the problem comes from firegate or antivirus software. But I can not shut down any of them because I am not the system administrator.
How to deal with this situation? Any help?
I spent entire day for this.
Problem solved. I tried all but nothing works. Finally I unistalled XAMPP and followed the steps from http://xdebug.org/wizard.php. My final xDebug part in php.ini file is(only uncommented content)
[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug-2.4.0rc2-5.6-vc11.dll"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.remote_port=9000
I thought my problem casued by the configuration in apach server. Because the first time when I wanted to start Apach server from XAMPP control panel, it said error because of port block. So I changed the port number instead of using the default port. And after I reinstalled the XAMPP control panel, I restarted the computer and started Apach server immediatelty to make sure nothing else occupied the port. And all works great. So it might be the problem. Hope useful.
I am using Windows7 of 64 BIT. My PHP version is 5.6.3 (got this using phpinfo();). I am trying to use XDebug with NetBeans. My Netbeans version is 8.0.2. My Xdebug section of phpinfo(); is as below.
I placed below code in php.ini file and restarted Apache as well.
[XDebug]
zend_extension = "D:\XAMPP\php\ext\php_xdebug.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "D:\XAMPP\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host=192.168.1.5
xdebug.trace_output_dir = "D:\XAMPP\tmp"
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"
I set a Breakpoint in my code of Netbeans. I am getting Waiting For Connection (netbeans-xdebug) at the bottom of Netbeans while I click on Debug project button.
Could any one know where is the problem ??
Since you already have it setup, I assume you checked all the usual suspects:
Config
Remote host
idkey
and so on.
Two things that I tend to forget are:
Select Web Root folder for the project
Make sure your code in Netbeans and on the server is the same. (Just
download the project again)
I have configured xdebug in wamp+netbeans. It installed properly and in phpinfo() it showing xdebug configuration information. But still I am not able to debug my application with it.
Sometimes it shows the waiting for connection error. Sometimes it doesn't show it but also not stopped on given breakpoints.
Following is my configuration :
PHP Version 5.3.9
PHP Extension Build API20090626, TS, VC9
In D:\wamp\bin\php\php5.3.9\ext\php_xdebug-2.2.1-5.3-vc9.dll
xdebug version: (in phpinfo)
Version 2.2.1
IDE Key netbeans-xdebug
In php.ini file
[xdebug]
zend_extension = "D:/wamp/php/ext/php_xdebug-2.2.1-5.3-vc9.dll"
xdebug.profiler_output_dir = "D:/wamp/tmp/xdebug"
xdebug.profiler_output_name = "cachegrind.out.%p"
xdebug.profiler_enable = 0
xdebug.profiler_append = 0
xdebug.extended_info = 1
xdebug.remote_enable = 1
xdebug.remote_handler = dbgp
xdebug.remote_mode = req
xdebug.remote_host = 127.0.0.1
xdebug.remote_port = 9000
xdebug.idekey = xdebug
xdebug.remote_log = "D:/wamp/tmp/xdebug/xdebug_remot.log"
xdebug.show_exception_trace = 0
xdebug.show_local_vars = 9
xdebug.show_mem_delta = 0
xdebug.trace_format = 0
I followed almost all tutorial on google (also on stackoverflow) and I think configuration seems to be correct. So what would be the issue?
If you want more information about configuration please let me know.
Any help would be appreciated.
Thanks in advance.
I had the same problem waiting for connection but there I found a very good step by step tutorial here which solved mine. Hope this link be also helpful for you.