Hi all,
I’m new to debugging and wondering if someone might be able to help - I’m trying to debug my local Wordpress site (Running on Flywheel of course) using Visual Studio Code but am having some trouble seeing variables.
Debugging for the most part looks to be working, I can add breakpoints and it stops the code accordingly, and I can inspect all of the global variables with no problems,
The issue I’m having is I can’t seem to get any of my local variables to show up when debugging. If you consider my function (See attached screenshot) - it defines 2 variables, $hello and $user.
$User shows in the variables panel, but $hello does not.
Here is the xdebug config set in my php.ini;
[Xdebug]
zend_extension = /opt/php/7.2.0/lib/php/extensions/no-debug-non-zts-20170718/xdebug.so
xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.remote_connect_back=On
xdebug.remote_port=“9000”
xdebug.profiler_enable=0
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir = /app/profiler
xdebug.scream = 1
xdebug.show_local_vars = 1
xdebug.remote_autostart = 1
xdebug.dump_globals=On
xdebug.collect_params=4
xdebug.show_local_vars=1
xdebug.var_display_max_depth=100
Xdebug.remote_host=192.168.95.100
I’ve also got the Chrome xDebug helper, but it doesn’t seem to do much helping at the moment
I’m not sure if I have xDebug setup correctly, from what I’ve read Flywheel comes with xDebug installed , I’m not sure how to verify that or update if needed
Any ideas you have would be very much appreciated
Many thanks