For people who find this and want a PHP 8 compatible version, it’s here.
]]>Sometimes I’m seeing the console error SyntaxError: missing ) after argument list. Looking at it, it seems like it might be something in the Kint code, but I’m not familiar enough with it to know for sure. It does seem to happen with Litespeed cache enabled, though I don’t know if that’s just a coincidence. It seems to revolve around the below code. Could be Kint exposing something in Litespeed, or Litespeed exposing something in Kint…
b.document.write("<html><head><title>Kint ("+(new Date).toISOString()+')</title><meta charset="utf-8">'+document.getElementsByClassName("-kint-js")[0].outerHTML+document.getElementsByClassName("-kint-css")[0].outerHTML+'</head><body><input style="width: 100%" placeholder="Take some notes!"><div class="kint">'+a.parentNode.outerHTML+"</div><script src="https://wellnessstockshop.com/prod/wp-content/plugins/litespeed-cache/assets/js/lazyload.min.js"></script></body>"),b.document.close()},x=function(a,b){function c(a){var c=1===b?a.replace(/^#/,""):a;if(isNaN(c))return a.trim().toLocaleLowerCase();c=parseFloat(c);return isNaN(c)?
Hi,
I have been using this plugin a fair bit and find it extremely useful. I am willing to look after the plugin and have a space on github for onboarding merge requests, keeping it up to date with debug-bar and query-monitor. I see that there is a php7.4 issue and I am happy to post a new relase for that. (I have been around the PHP community in both WordPress and Drupal for a pretty long time and have experience with managing the community projects.)
@misternifty @chriswallace @cdillon27
Thank you!
–Dan
Could you update on line 463 of /vendor/kint/inc/kintParser.class.php
The curly braces around the array to square brackets?
From this
if ( $key{0} === "\x00" ) {
$access = $key{1} === "*" ? "protected" : "private";
to this
if ( $key[0] === "\x00" ) {
$access = $key[1] === "*" ? "protected" : "private";
Thank you.
]]>Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 121635488 bytes) in /<PATH>/wp-content/plugins/ns-cloner-site-copier/vendor/kint-php/kint/src/Renderer/RichRenderer.php on line 545
I think I have enough memory?
]]>I’m calling kint d() function from within a class but I can’t get any output into the kint console. This is similar to what I have.
add_action( 'wp_loaded', 'viewClassVar');
function veiwClassVar(){
$obj = new classVar;
$obj->dumpVar;
d( $obj);
}
class classVar {
public function dumpVar() {
$test = "this is a test";
d( $test);
}
}
The action d( $obj) works fine, but d( $test) from within the class method doesn’t show anything. Is there a way to be able to see dumps executed from within a class?
Thanks,
-Norm
I’m not sure if this is a kint problem or a Query Monitor problem so I’m submitting to both:
For a test I have created a simple plugin that just stores an incrementing variable in $_SESSION and dumps the value before and after incrementing. Here’s the simple code:
function myStartSession() {
if(!session_id()) {
session_start();
}
d($_SESSION['iteration']);
$_SESSION['iteration'] += 1;
d($_SESSION['iteration']);
}
add_action('init', 'myStartSession');
The expected behavior is that on every page refresh the starting value of “iteration” will be the previous end value of “iteration”. e.g.
val = 1
val = 2
refresh page
val = 2
val = 3
refresh page
val = 3
val = 4
When I have kint + debug bar active it all works as expected. But when I have kint + query monitor active then WP behaves like it runs the functions twice, with one of the runs being kinda invisible (no output). So instead of the above expected result I get something like:
val = 1
val = 2
refresh page
val = 3
val = 4
refresh page
val = 5
val = 6
I discovered this behavior because another plugin that I use writes an activity log to the db. With kint + query monitor active I always get duplicate entries into the database. But without that combination everything is fine.
Here’s a screencast that walks through what I’m seeing:
]]>Hi,
I have a quite large multidimensional array. Yes, this is the reason I installed Kint debugger.
Unfortunately, when I open the array via [+], all arrays are being opened.
How can I manage to open only the first sublevel arrays?
Picture how I want it:
https://share-your-photo.com/3fdbb52625
Picture how it looks like now (the actual list is around 10x longer):
https://share-your-photo.com/e15b391427
… and thank you for this nice plugin !!!
]]>Just starting to use Kint. I notice “code = 9” or the like in the output. Is there a list of these codes somewhere where I can see what these codes mean?
]]>I enabled your plugin last week, and it worked beautifully. this week, I grabbed a new copy of the db from our dev server, installed it, and re-activated the plugin, and it provides no output when I place <?php d($p); ?> inside my loop.
I tried deactivating and deleting the plugin, so I could install fresh, but that didn’t help.
]]>Hello,
I installed Kint Debugger and received the following error message, after using d($data):
Error: Class ‘Kint’ not found in /srv/Projekte/wp-dev/wp-content/plugins/kint-debugger/kint-debugger.php on line 101
PHP Version: PHP 7.1
WordPress: 4.8.2
Hello,
I’ve wrapped my d() calls in a wrapper debug function that, amongst other things, checks to make sure this plugin is installed (and to not throw errors when d() is not available on different staging/production setups, etc).
The fallout of this is that Kint then lists the parameter names of my wrapper function. for example:
debug($var, $var2){
if(function_exists('d'){
d($var, $var2);
}
}
$test = 'foo';
$test2 = 'bar;
d($test, $test2);
will create a kint output with $var $var2 as the source vars rather $test and $test2. Is there anyway to pass through the original variable names?
I realize this is more of a question about Kint itself, but thought worth asking here.
thank you,
Erik
Hello,
I’m not getting output from d() when I’m debugging inside the wp dashboard (/wp-admin).
Is that expected?
Is there a way to enable it?
If you get a white screen after updating the plugin, you will need to comment out your d()
calls and reactivate the plugin.
To adhere to standards, I changed the name of the main plugin file from kint-debugger/plugin.php
to kint-debugger/kint-debugger.php
. WordPress cannot find the old file so it deactivates the plugin.
This will not happen again since the file is properly named now.
]]>After updating the plugin debyuprint (function d ())
displays log debug in the same place where it causes while debug bar ничего obkstoy not output port. It does not work with the integration plugin Debug bar
Debug Bar panel is hidden behind at least two clicks. Occasionally that’s too much work to do with a lot of page reloads and it’d make sense to just force display the output inline like Krumo.
I’m browsing through the code but have trouble understanding what a sensible way to patch this in would be. Help?
]]>In some cases, live stuff has to be debugged. Non-admin visitors or even lower privileged logged in users should not be able to see debug output, so it should be possible to restrict output based on capabilities.
]]>Hiya,
Happy to have just discovered your plugin & delighted to see the Debug Bar integration.
However when I look at the Kint website, it looks like a new version of Kint has been out for a while.
Just wondering if the plugin will be updated with this new version of Kint.
Smile,
Juliette
Compressed version of the kint.js broken. Atleast in Chrome. I copied the source js from view/src/kint.js to view/kint.js and it worked!
Great plugin!
]]>