I can't get Xdebug work with PHPStorm2016 and Wamp. Here is some details.
I've installed PhpStorm, Xdebug on Chrome and WAMP on my local machine.
My working directory is located on WAMP in www/b2b-working/
PHP.INI
[xdebug]
zend_extension ="C:\wamp64\bin\php\php5.6.16\ext\php_xdebug-2.4.0-5.6-vc11-x86_64.dll"
xdebug.remote_enable = on
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir ="C:/wamp64/tmp"
xdebug.show_local_vars=0
Web Server pictures
Debug Configuration and server pictures
If I'm starting to listen for PHP Debug Connections the localhost is blocked and I need to click next in the debugger to display the page
However, when I'm trying to actually have a break point on my project which is located in localhost/b2b-working it does not catch any of the breaking point. I don't know what I'm missing.
The Validate Debugger Configuration on We Server is all checked
Any help is welcome
I've found the solution. Basically, you need to edit the .htacess file with the following instructions
Related
I have read and tried what I've found yet I cannot get it to work, it just keeps on hanging at "Waiting for connection (netbeans-xdebug)" when starting debugging.
I do have xdebug installed (I am using wamp) and I've actually managed to get breakpoints working with sublime text 2 (yea that's right!) so the problem is not with php/xdebug on my pc per se but some setting I am missing.
my php.ini for xdebug:
; XDEBUG Extension
[xdebug]
;zend_extension ="c:/wamp64/bin/php/php5.6.25/zend_ext/php_xdebug-2.4.1-5.6-vc11-x86_64.dll"
zend_extension ="c:\wamp64\bin\php\php5.6.25\ext\php_xdebug-2.5.4-5.6-vc11-x86_64.dll"
xdebug.remote_enable = 1
xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir ="c:/wamp64/tmp"
xdebug.show_local_vars=0
xdebug.remote_hander =dbgp
xdebug.remote_mode = req
xdebug.remote_host =127.0.0.1
xdebug.remote_port = 9000
xdebug.idekey=netbeans-xdebug
xdebug.remote_connect_back=1
xdebug.remote_autostart=1
Netbeans debugging options are set as defaults except I unchecked "stop at first line" coz I read somewhere to do so.
If you need more info on something let me know.
I've found the issue for myself (since everything else seems to be in order on my side), netbeans will not debug non root urls for some reason, and of course I dont want to open the root every time so I've made a virtual host for that specific project with a regular url (www.someurl.com) and it seems to be working fine now.
Also I am not sure every single line is needed from my php.ini xdebug settings but I've kept it so, since I am not bothered to check for redundant lines, so if you are not sure about your xdebug settings just copy the whole thing from my Q.
I'm using PHPStorm and Xdebug. I'm trying to debug a Web Application Project configured in my localhost. There are no symbolic links in my project path.
Below is Xdebug configuration in my php.ini:
[Xdebug]
xdebug.remote_port=9000
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.profiler_enable=1
xdebug.remote_host=localhost
xdebug.remote_handler=dbgp
xdebug.idekey = "PHPSTORM"
xdebug.profiler_output_dir="/tmp"
xdebug.remote_log="/tmp/xdebug.log"
zend_extension=/usr/local/php5/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so
Below are two variables exported in my zsh:
export PHP_IDE_CONFIG="serverName=localhost"
export XDEBUG_CONFIG="idekey=PHPSTORM"
Below is server configuration:
Below is debug configuration:
Below is the screenshot of first breakpoint where I see no variable values.
Below is the screenshot after 'Step In'. It shows: Waiting for incoming connection with ide key 'PHPSTORM'.
I get below message in event log:
Debug session was finished without being paused.
It may be caused by path mappings misconfiguration or not synchronized local and remote projects.
To figure out the problem check path mappings configuration for 'dev.sales-crm.com' server at PHP|Servers or enable Break at first line in PHP scripts option (from Run menu).
My problem is: after debugging is started, then control stops at first breakpoint. It shows no variables values. Then If I try to 'step into', then debugging stops.
Please help me. Below is the link to xdebug logs: xdebug.log
I upgraded my Xdebug version form Xdebug 2.5.0rc1 to Xdebug v2.5.0 and it started working.
Thank you very much.
I have been searching for a satisfactory answer on the net and StackOverflow without success. How should I debug Magento as a whole application — not a single file — using the PhpStorm IDE? You can do this in Visual Studio, Netbeans, and IntelliJ IDEA but I need to know how to debug an application, such as Magento, using PhpStorm.
When I try to run the debugger on a controller, such as C:\xampp\htdocs\coinandbuillion\app\code\core\Mage\Checkout\controllers\CartController.php, a bunch of errors get thrown because PhpStorm is trying to execute the file directly rather than working through the application dispatcher in index.php.
So does anyone know how to debug automatically from the initialization point of application till the end?
Here is snapshot what i got. I cant debug after that button click.
Finally I did it !!! :) Please refer steps I followed.
Install Jetbrain's chrome extension from Here.
Now follow steps as below.
In 3rd snapshot in image. your Built in server port(mine is 63342) may be different for you,I didnt change it , it was already there(default), I have just shown it. I changed other options only.
That's it !!
Edit 1:
IF you have problem writing all xdebug setting in php.ini from diagram 1, here it is text version: Don't change paths exactly like i have because you may have xampp/wamp installed on other drive, in different folder. So please add paths like zend_extension accordingly.
[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.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.trace_output_dir = "C\xampp\tmp"
xdebug.remote_port = 9000
xdebug.idekey=PHPSTORM
Ensure following :
Ensure you have Installed Chrome Extension from Here
Make sure xampp/wamp server is running.
Make sure Xdebug debugger is configured.
If not , Goto File->Settings -> search PHP and follow diagram as follows
I asked this question before but not in detail enough.
My problem is, I use Eclipse Kepler with the PDT Plugin from this site:
Kepler - http://download.eclipse.org/releases/kepler
And I use XAMPP 1.8.3.
The problem is, my XDebug not stopping at breakpoints.
My settings are as follow:
php.ini
[XDebug]
zend_extension = "C:\dev\xampp\php\ext\php_xdebug.dll"
;xdebug.profiler_append = 0
;xdebug.profiler_enable = 1
;xdebug.profiler_enable_trigger = 0
;xdebug.profiler_output_dir = "C:\development\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_cookie_expire_time = 25920000
;xdebug.trace_output_dir = "C:\development\xampp\tmp"
In Eclipse I have:
If I check "Break at first line" it stops. But if I call a page, like index.php it do not stop although I set breakpoints in this file.
Is it possible to use Xdebug in Eclipse Kepler?
EDIT
I set the xdebug.remote_log property into php.ini.
By start debugging idekey is set correctly in the logs:
idekey="ECLIPSE_DBGP"
Now, if I call a page in my webapp like feedback.php the idekey is suddenly:
idekey="netbeans-xdebug"
I think this could be the problem. But how can I change the Ide key eclipse send?
EDIT 2
I realized too, that xdebug only not works in external browser. In eclipse internal browser I am able to debug.
Oh man :-)
I cannot believe what my mistake was.
I installed the firefox extension "the easiest xdebug" and it has value "netbeans-xdebug" in the configs.
Simply deactivated the extension and now it works. :-)
OK, been banging my head against the wall again for a few days. Trying to follow a suggestion from another answer on SO here: https://stackoverflow.com/questions/11955822/php-file-caching-vs-cache-through-htaccess . In trying to set up a local test environment with xDebug, I downloaded WampServer because it said that it was a complete package that came with xDebug included. I have tried various settings in PHP.ini, but cannot get xDebug to appear on the Debug menu of WampServer. I saw an image of a Wamp menu that had it listed in the Debug menu, along with WebGrind that I do have, but cannot accomplish the same feat.
Here are my current PHP.ini settings for xDebug (that includes a few rem'd out):
; XDEBUG Extension
;zend_extension = "c:/wamp/bin/php/php5.3.13/zend_ext/php_xdebug-2.2.0-5.3-vc9.dll"
zend_extension = c:\wamp\bin\php\php5.3.13\ext\php_xdebug-2.2.1-5.3-vc9.dll
[xdebug]
xdebug.default_enable = On ;added
xdebug.remote_enable = On ;Off
xdebug.remote_port = 9000 ;added
xdebug.remote_handler="dbgp" ;added
xdebug.remote_host="localhost" ;added
xdebug.profiler_enable = On
xdebug.profiler_enable_trigger = On ;Off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "c:/wamp/tmp"
xdebug.trace_output_dir = "c:/wamp/tmp" ;added
;xdebug.show_local_vars=On
;xdebug.dump.SERVER=HTTP_HOST, SERVER_NAME
;xdebug.dump_globals=On
;xdebug.collect_params=4
;xdebug.show_local_vars=1
Yes, I am aware that there are two separate PHP.ini files in Wamp, but making the change in both does nothing.
I have tried the "custom installation" instructions on the xDebug website, but that does not do anything.
phpinfo file lists it as being installed.
I can find the xDebug client in the Wamp tool's folder and open it, but the open file option on the xDebug menu is grayed out and does not work.
I have explored and tried various solutions found here on the SO website, but still no joy.
I even found a nice step by step installation webpage for WampServer and xDebug here http://www3.ntu.edu.sg/home/ehchua/programming/howto/WampServer_HowTo.html, but all I succeeded in doing was downloading another very large program called eclipse, installing and configuring that, but still nothing. This does appear to be a nice looking program, but after doing the configuration, it does not seem to associate with wampserer either.
xDebug and wampserver do appear to be very common issues asked here on SO...so any ideas that actually work???
BTW: is there any way of increasing the font size in this question and comments box here on SO, so I do not have to use a magnifying glass to see what I am typing??? I know that it is repeated down below but it is a lot easier to see what you are typing, where you are typing...just my two cents...
Thanks for any assistance,
Stan...
Try Following these Steps
Open your Wamp Server phpinfo() page.
Copy Evrything in it Using a Big Control+A and the Paste it in the xDebug Wizard. Here is the link
http://xdebug.org/wizard.php
Now Download the DLL file provided by the Wizard and put it in your wamp/bin/php/php/ext folder.
Paste the Following Code in your php.ini file at the very end...
NOTE: use php.ini under wamp/bin/apache/apache/bin/php.ini
zend_extension="C:/Softwares/wamp/bin/php/php5.3.8/ext/php_xdebug-2.2.0-5.3-vc9.dll"
[xdebug]
xdebug.remote_enable=on
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
Hope this works fine for you. I got this information after working 3 to 4 days to get xDebug on NetBeans. :)
Remove the "" from *zend_extension*
Remove ; infront of zend_extension
And finally use this code in PHP.ini both files.
[xdebug]
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "c:/wamp/tmp"
xdebug.remote_enable=1
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
To work with xdebugclient, you need to add XDEBUG_SESSION_START=session_name as a parameter to the URL, where session_name is the name of your debug session.