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. :-)
Related
I try to configure Xdebug Client for Sublime Text 3 on Windows 10 (with PHP Version 7.3.0 and 2.7.0RC2 Xdebug version).
I read issues for days because the panels context were always blank, but I solved it adding "super_globals": false in Xdebug.sublime-settings.
Now the Xdebug Context show:
The problem is the breakpoint never hits. never show me the Steps options (into, over). Even, don't show the little yellow arrow on left side.
I believe that it's related to path_mapping configure, but this really confuse me.
I dont understand why I need configure path_mapping if I work only on localhost on xampp.
php.ini:
[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug-2.7.0RC2-7.3-vc15.dll"
xdebug.remote_enable = 1
xdebug.remote_host = 127.0.0.1
xdebug.report_port = 9000
xdebug.remote_handler = dbgp
xdebug.remote_mode = req
xdebug.remote_connect_back = 0
xdebug.idekey = sublime.xdebug
xdebug.trace_output_dir = "C:\xampp\tmp"
xdebug.remote_log = "C:\xampp\php\tmp\xdebug.log"
You might need to add xdebug.remote_autostart = 1. Per the XDebug documentation:
xdebug.remote_autostart Type: boolean, Default value: 0
Normally you need to use a specific HTTP GET/POST variable to start remote
debugging (see Remote Debugging). When this setting is set to 1,
Xdebug will always attempt to start a remote debugging session and try
to connect to a client, even if the GET/POST/COOKIE variable was not
present.
See: XDEBUG EXTENSION FOR PHP | DOCUMENTATION
Of course, restart your server after adding.
EDIT: See also Derick's answer on this StackOverflow page about using a log file to troubleshoot, if the above doesn't work.
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 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
i'm using PHPStorm and trying to run Xdebug according this video https://laracasts.com/series/how-to-be-awesome-in-phpstorm/episodes/20?autoplay=true.
First part works perfectly (https://laracasts.com/series/how-to-be-awesome-in-phpstorm/episodes/19?autoplay=true), but i'm stuck at second one.
Port 9000 was not working, so i changed it to 10000.
I configured PHP Web Application configuration
and after I press debug button, web is blank
and still loading and PHPStorm is waiting for incoming connection.
I have checked "can accept external connection" at PHP - Debug - Xdebug and xdebug in php.ini configured like this:
[XDebug]
zend_extension="/usr/local/Cellar/php56-xdebug/2.3.3/xdebug.so"
xdebug.remote_enable = 1
xdebug.cli_color = 1
xdebug.show_local_vars = 1
xdebug.remote_port = 10000
xdebug.remote_host= localhost
xdebug.remote_autostart = 1
xdebug.remote_log="/usr/local/tmp/xdebug.log"
xdebug.idekey = "PHPSTORM"
xdebug.ide_key = "PHPSTORM"
xdebug.profiler_enable = 1
xdebug.profiler_output_dir="/usr/local/tmp/xdebug-profiler"
xdebug.profiler_enable_trigger = 1
I tried to validate web server with this result:
I was googling and trying solve this for 6 hours, try to help me please, i`m kind of dummy in this.
Using OS X El Capitan.
I can debug single script, but not a whole website.
When i run this directly online-chef.dev:10000, it says ERR_CONNECTION_REFUSED.
"online-chef.dev" is at local virtual host.
What I am doing wrong?
Thank you so much!
You are tried to debug web page through xdebug. For debug javascript you need install browser extention. This is manual for javascript debugging.
For javascript debug get current extention port and enter in this place:
For XDebug i don't want always click debug button, so i simple enable listen connections. This is manual for XDebug from JetBrains.
Here is my xdebug config that working with listen connections.
xdebug.idekey = "PHPSTORM"
xdebug.remote_port = 9001
xdebug.remote_mode = "req"
xdebug.remote_host = 10.0.2.2
xdebug.remote_handler = "dbgp"
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.extended_info = 1
So, when i need debug javascript i click debug button. When i need debug php i just put breakpoint.
First set up debugging instruments often is hard, but it's pays off.
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