The title isn't my best; I was wondering how it's possible to run XDEBUG
each time a script is executed on a local server, I have access to all configuration files you'd need, and I have XDEBUG
for PHP
running happily currently.
The only thing is it only runs when there's a GET
request formed with the key of XDEBUG_PROFILE
set to true, or just set, and currently with the framework I'm working on,
The framework doesn't allow for extended
GET
requests in the URL, only slug-related data to be presented, andIf I try and set
$_GET['XDEBUG_PROFILE'] = true
in a file on the framework, such as aController
, the profiler gives unusual data, and creates profiles on other requests such asfavicon
loads and such and such, which gives awkward data to sift through.
So I thought it'd be a smart idea to be able to trigger XDEBUG
on every script, just while I do development on the framework to get performance records, etc...
My current XDEBUG
config in php.ini
:
[XDebug]
;;;;;;;;;;;;;;;;;;
extension=php_xdebug.dll
xend_extension_ts="C:/xampp/apache/modules/php_xdebug-2.4.1-5.6-vc11.dll"
zend_extension = "\xampp\php\ext\php_xdebug.dll"
xdebug.collect_vars = 1
xdebug.show_local_vars = 1
xdebug.collect_params = 4
xdebug.remote_enable = 1
xdebug.remote_connect_back = 1
xdebug.profiler_enable = 1
xdebug.profiler_output_dir = "\xampp\tmp\"
xdebug.profiler_output_name = "cachegrind.out.%u.%R"
xdebug.profiler_enable_trigger = 1
xdebug.remote_host=127.0.0.1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
I tried to search this up, but the only tutorials were how to actually set up XDEBUG
itself, which I've already done, I thought the changed variable would be xdebug.profiler_enable_trigger = 1
, but wasn't completely sure.
Thanks in advance!