I installed PhpStorm and Xdebug. When I'm trying to debug in a PhpStorm, not on a web page the debugger doesn't work.
I added the following code in php.ini
[Xdebug]
zend_extension = "C:\xampp\php\ext\php_xdebug-2.8.0-7.2-vc15.dll"
xdebug.remote_enable = 1
I also downloaded "php_xdebug-2.8.0-7.2-vc15.dll" and put it in C:\xampp\php\ext folder.
Related
Install XAMPP v3.2.4 x64 in c:\xampp and set path to environment variable
Get all text in phpinfo() and download dll file as per https://xdebug.org/wizard and copy in c:\xampp\php\ext
and add text zend_extension=path in end of php.ini and check phpinfo() page and xdebug adding to this
Add [XDebug] xdebug.remote_enable = 1 xdebug.remote_autostart = 1
in php.ini
Install VSCode v1.52.1
install Php Debug v1.13.1
Create project in htdocs name of test and create file in to test.php
Text in to test.php and set breakpoint in line
Create automatic launch.json for PHP
Start debug
Start chrome and url: localhost/test/test.php
But when refresh page breakpoint not working and not stop code.
just just check listen port
[XDebug]
zend_extension=C:\xampp\php\ext\php_xdebug-3.0.1-7.2-vc15-x86_64.dll
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.mode=debug
xdebug.idekey=VSCODE
xdebug.start_with_request=yes
xdebug.client_host=127.0.0.1
xdebug.client_port=9000
I'm trying to install xdebug on my ubuntu linux system.
Correct .so file, make install everything is correct, just maybe the php.ini configuration?
I use the installation wizard.
Installation Wizard Step by Step
I am at step 9, added the zend_extension on my INI file.
Added Zend Extension Command on other INI file.
when i PHP_INFO(), xdebug just does not appear in the list.
I googled around and seems other people php.ini file have this
xdebug.remote_enable=true
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.profiler_enable=1
xdebug.profiler_output_dir=/tmp
but mine does not?
So i added those into my php7.4/cli/php.ini
still does not show on my phpinfo?
I go to the terminal and type php info xdebug seems there. xdebug support => enabled Version => 2.9.6
but i created a testpage.php and put phpinfo();
xdebug does not appear in the page?
Am i missing something?
Yes you need to update your php.ini file. Below is the code lines that i added in my php.ini file.
[XDebug]
zend_extension = "path of you extension example /usr/lib/php/xdebub.so"
xdebug.remote_autostart = 1
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
Must restart your server after any changes in php.ini file.
I have setup a new dev environment using windows for the first time. I have WAMP installed and I am using netbeans as my IDE and have XDebug installed and reference in my php.ini file.
; XDEBUG Extension
zend_extension = "c:/wamp/bin/php/php5.4.12/zend_ext/php_xdebug-2.2.3-5.4-vc9-x86_64.dll"
which points to my xdebug.dll file.
When I try to debug within netbeans however, it is not stopping on any of my breakpoints. Any ideas of how to get it correctly debug by stopping at my breakpoints? Also just to verify that i am going to the page in question with my firefox browser so its not that I am not running the code
I added the following to my php.ini file and now debugging is stopping on my breakpoints in netbeans
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_enable=1
xdebug.remote_handler="dbgp"
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"
What I'm running:
Mac OSX 10.6.8
MAMP 2.0.5
Netbeans 7.0.1
current settings in php.ini
[xdebug]
xdebug.default_enable=1
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_autostart=1
Looks like my setup for xdebug in the php.ini file are all right in that my webpage shows php errors and notices in the typical orange table.
But when I click the debug button in Netbeans, it generates a URL that starts with http://localhost/sitename/XDEBUGSESSIONblabla instead of http://localhost:8888/sitename/XDEBUGSESSIONblabla
In the php.ini file, I tried the setting
xdebug.remote_host=localhost
as well as
xdebug.remote_host=localhost:8888
I commented out all the zend variables in the php.ini file, but not the zend_extension below [xdebug] i.e. the one that says: zend_extension="/Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so"
There is also [xcache-common] - section a little above the [xdebug] section in the php.ini file that also has a rule about the zend_optimizer that I left uncommented because it doesn't belong to the [Zend] section of the php.ini file.
On a sidenote: I can't actually find any [Zend] section in my php.ini file but I saw it mentioned in the tutorials I'm trying to follow:
Here
and
Here
Putting :8888 after localhost in the Netbeans project URL settings a second time did the trick. So it means that after the project was being created, right clicking the project folder and then in the dialogue box under 'Run Configuration' the third field from the top says 'Project URL'. That's where you can change it after project creation.
I have an OS-X setup and using Netbeans IDE for my PHP programming. I have xdebug installed in the following path of
zend_extension="/Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so"
Under which I have xdebug.remote_enable set to On..such as
xdebug.remote_enable = on
This is the desired Netbeans Xdebug configuration recommendation .
And upon viewing my phpinfo:
I get
xdebug.remote_enable = off
Not sure where it is picking up this information from, and any other xdebug parameter configurations do not alter themselves either.
This is getting me confused as to what is going wrong.
The php version that is running is 5.3.6.
I had the same problem and later found that I was editing the wrong php.ini file. You should edit the file located under /Applications/MAMP/bin/php/php5.3.6/conf/php.ini and write xdebug.remote_enable = 1