Var_dump debug not working
-
Hi, When i put this in my plugin.php file outside of functions, it works. When I put them in a function, I just get a white screen surrounded by the admin panel. I want to `change the value of $posts to $myvariable
$posts = get_posts(); echo '<pre>'; var_dump($posts); echo '</pre>'; die();Also when I turn debug on on my local site, I don’t get the info at the top of the site. It simply looks the same. I do get the log turned on.
I need to debug, I need these tools or I feel I won’t get very far.
Can you use var_dump inside a function in a plugin? How else could you read the value of variables while the code runs and requests are sent?
Here’s my code in the WP-config.php file in case you’re doubting me, not inside comments in the correct folder for my local site. I’m using local by flywheel btw.
define( 'WP_DEBUG', true); define( 'WP_DEBUG_LOG', true); define( 'WP_DEBUG_DISPLAY', true);Thank you guys
The topic ‘Var_dump debug not working’ is closed to new replies.