adrian Posted February 21, 2019 Author Share Posted February 21, 2019 Hey @szabesz - a modules refresh and/or Tracy settings save will fix that. I converted one of the settings from a string to an array. I probably should have handled it better, but that's all you need to do. 1 Link to comment Share on other sites More sharing options...
szabesz Posted February 21, 2019 Share Posted February 21, 2019 Thanx for the help! Module refresh did not help but saving settings did. 1 Link to comment Share on other sites More sharing options...
Ivan Gretsky Posted February 22, 2019 Share Posted February 22, 2019 Good day everybody! When I think about TracyDebugger, I always think about the invaluable functionality of this must-have module. But yesterday I had a new impression about TracyDebugger - its super appealing design (in places). I was installing Tracy on a new site and was astonished by the new look of a "Donate" button in the module config. It is super simple and probably even a standard PayPal button, but it's placement and a color contrast just struck me. I could not resist, clicked the button and made a $10000 donation. This is by far less than the value this module gives me, so wanted to give something back (and the magic button did its job, of course). But must be something with PayPal in Russia that it only let $5 of my donation pass though ?. So I suggest everybody go look at this button in the TracyConfig to learn some useful marketing tricks. And if you happen to be somewhere outside Russia please click on it and try to make a more than $5 donation to check, if the same limits apply in your country. So we can report to PayPal or something))) 5 Link to comment Share on other sites More sharing options...
szabesz Posted February 22, 2019 Share Posted February 22, 2019 3 hours ago, Ivan Gretsky said: only let $5 of my donation pass though I can tell you how to transfer me the $9995 you could not get rid of, just PM me ? 2 2 Link to comment Share on other sites More sharing options...
adrian Posted February 25, 2019 Author Share Posted February 25, 2019 Hi everyone, Just released v4.18 this morning which comes with the new Tracy core v2.6 I have managed to retain PHP 5.4.4+ support for now. If you are running PHP 7.1+ you will get the new Tracy core, otherwise you'll be using the old 2.5 branch. I decided not to ditch < 7.1 just yet because Debian stable still ships with 7.0. Here's the list of changes: 1) New multiple AJAX debug bars This allows you to see more than one consecutive AJAX call. There is a new module setting that controls the number of AJAX bars (default 3). Adjust this if you need, but keep in mind that you don't want lots of bars stacking up as you navigate around the PW admin where opening menu items / pages are all AJAX calls. This new feature also means that the AJAX dumps panel no longer needs to store consecutive dumps, but if you still want that, then the Dumps Recorder panel will do that. 2) BarDump (bd) and barDumpBig (bdb) calls now use LIVE This feature was always not quite right in the Tracy core, but it has been rebuilt and is now the default for these calls. This makes the dumping of large / multiple objects 10x faster. It also means that we can probably increase the default maxDepth setting and increase the value for the barDumpBig even further. I haven't made these changes yet, but I am going to start testing here and see how it goes. This means that there is no longer a need for the barDumpLive (bdl) method, so this has been removed. 3) Lots of other minor/rare bug fixes and improvements Nothing worth mentioning specifically, but definitely worth having ? There will likely be more improvements to these new core features coming pretty soon, so I'll make sure we stay up to date with those also. Let me know if you notice any problems. Cheers! 7 2 Link to comment Share on other sites More sharing options...
adrian Posted February 26, 2019 Author Share Posted February 26, 2019 Several more Tracy core updates just committed that improve live dump performance among other things. I have also changed the default editor protocol handler from Sublime Text to VSCode - I feel like this will be a more useful default as it seems VSCode is gaining lots of users around here. 2 1 Link to comment Share on other sites More sharing options...
kongondo Posted February 26, 2019 Share Posted February 26, 2019 5 hours ago, adrian said: have also changed the default editor protocol handler from Sublime Text to VSCode - I feel like this will be a more useful default as it seems VSCode is gaining lots of users around here. Hooray! Any tip how to set this up for a linux box? Ta! Link to comment Share on other sites More sharing options...
adrian Posted February 26, 2019 Author Share Posted February 26, 2019 3 hours ago, kongondo said: Hooray! Any tip how to set this up for a linux box? Ta! Does this help: https://github.com/shengyou/vscode-handler 1 Link to comment Share on other sites More sharing options...
adrian Posted February 26, 2019 Author Share Posted February 26, 2019 Also, have you read this: https://tracy.nette.org/en/open-files-in-ide - not actually sure whether you need this or not. I don't think I ever heard from the Windows folks whether this was needed or not. 1 Link to comment Share on other sites More sharing options...
kongondo Posted February 26, 2019 Share Posted February 26, 2019 6 minutes ago, adrian said: Does this help: https://github.com/shengyou/vscode-handler I'll have a look, cheers! Btw, for some reason I still thought Tracy does not support debugging in a modal?! I only noticed the setting yesterday when we were trying to help @JoshoB with the asmSelect problem! How this could have helped me recently, with VPS (lots of modal interaction)! I feel foolish ?. Thanks for Tracy again, @adrian! 1 Link to comment Share on other sites More sharing options...
adrian Posted February 26, 2019 Author Share Posted February 26, 2019 30 minutes ago, kongondo said: Btw, for some reason I still thought Tracy does not support debugging in a modal? Sorry, perhaps those should not be disabled by default - generally I find it a bit obtrusive having the debug bar on in a modal and in general we are talking about the PW admin for these, so usually you don't need to debug them. Occasionally I enable them for a particular need. 2 Link to comment Share on other sites More sharing options...
matjazp Posted March 4, 2019 Share Posted March 4, 2019 Adrian, I can't maximize the console panel, I see this error in Chrome console: Uncaught ReferenceError: tracyPanel is not defined at tracyResizePanel (?_tracy_bar=js&v=2.6.1&XDEBUG_SESSION_STOP=1:1130) at HTMLAnchorElement.onclick (?id=1015&s=1&c=1:1744) Not sure when this started... 1 Link to comment Share on other sites More sharing options...
adrian Posted March 4, 2019 Author Share Posted March 4, 2019 2 hours ago, matjazp said: Adrian, I can't maximize the console panel, I see this error in Chrome console: Thanks for the report - looks like the new Tracy core is forcing strict rules in JS which is affecting some sloppiness in my code. I have fixed this one, but I think we'll need to lookout for issues like this. 1 Link to comment Share on other sites More sharing options...
bluellyr Posted March 5, 2019 Share Posted March 5, 2019 Hi, I think this is a newbie question but I am trying to use Tracy Debugger to debug code on the a field in the Template context but gives me the error: - "Fatal error: Uncaught Error: Call to undefined function ProcessWire\barDump()" I tried to use: TD::barDump('test'); and $TD = $this->modules->get('TracyDebugger'); $TD::barDump('test'); but also gives an error. How can I call the barDump() on a field in the template context ? Many thanks Link to comment Share on other sites More sharing options...
adrian Posted March 5, 2019 Author Share Posted March 5, 2019 Hi @bluellyr - in general you should use the shortcut methods: bd(), d(), l(), fl(), etc but if for some reason you don't want to, try: \TD::barDump('test'); The reason you need the backslash is because your template files have the ProcessWire namespace so you need to get to the global namespace to access the TD class. Link to comment Share on other sites More sharing options...
bluellyr Posted March 5, 2019 Share Posted March 5, 2019 2 minutes ago, adrian said: Hi @bluellyr - in general you should use the shortcut methods: bd(), d(), l(), fl(), etc but if for some reason you don't want to, try: \TD::barDump('test'); The reason you need the backslash is because your template files have the ProcessWire namespace so you need to get to the global namespace to access the TD class. Hi, even using: \TD::barDump('test'); or bd(), d(), l(), fl(), when trying to debug a field on the template context I always get the following error, in this case I was trying to use \TD::barDump('test'); I think that is because the module Tracy Debugger is not loaded when editing a field on the template context, can this be the case? Thank you Link to comment Share on other sites More sharing options...
adrian Posted March 5, 2019 Author Share Posted March 5, 2019 Sorry @bluellyr - my apologies - I didn't initially realize what you meant by "template context". Using Tracy to debug the PW core is hit and miss. It loads before all site modules, but for the core and core modules it often isn't available depending on exactly what you are trying to debug. Unfortunately there isn't anything I can do about this. Typically for this, using $log->save('testing', json_encode($page)); or something like that is your best bet. 1 Link to comment Share on other sites More sharing options...
bluellyr Posted March 5, 2019 Share Posted March 5, 2019 1 minute ago, adrian said: Sorry @bluellyr - my apologies - I didn't initially realize what you meant by "template context". Using Tracy to debug the PW core is hit and miss. It loads before all site modules, but for the core and core modules it often isn't available depending on exactly what you are trying to debug. Unfortunately there isn't anything I can do about this. Typically for this, using $log->save('testing', json_encode($page)); or something like that is your best bet. Thank you, for the explanation and for the alternative. All the best 1 Link to comment Share on other sites More sharing options...
matjazp Posted March 5, 2019 Share Posted March 5, 2019 1 hour ago, adrian said: Using Tracy to debug the PW core is hit and miss. It loads before all site modules, but for the core and core modules it often isn't available depending on exactly what you are trying to debug. It often happens to me too. I know Ryan made some adjustments in the core so that Tracy is loaded earlier (if I remember correctly), but is there really nothing that could be done in that regard? Could we have some sort of bd() function always available? Independent of the modules load order? Something that we put in init.php, even index.php? Yes, I do use $log methods, but Tracy is very handsome and good looking ? 1 Link to comment Share on other sites More sharing options...
adrian Posted March 5, 2019 Author Share Posted March 5, 2019 16 minutes ago, matjazp said: It often happens to me too. I know Ryan made some adjustments in the core so that Tracy is loaded earlier (if I remember correctly), but is there really nothing that could be done in that regard? Could we have some sort of bd() function always available? Independent of the modules load order? Something that we put in init.php, even index.php? Yes, I do use $log methods, but Tracy is very handsome and good looking ? The changes Ryan made were to ensure that Tracy is always the first "site" module loaded. This means you can always debug other site modules. Getting Tracy to load earlier is problematic. init.php won't help - it already loads on init. I would like to be able to load Tracy earlier, but I don't see Ryan being keen on doing what is required to make that happen. You have got me thinking though about figuring out how we might be able to at least get bd() working earlier - this wouldn't include all of Tracy's other error capturing / reporting abilities, but I think it would still be helpful. I'll have a think about it. 1 Link to comment Share on other sites More sharing options...
Robin S Posted March 5, 2019 Share Posted March 5, 2019 @bluellyr, your screenshot shows a modal. Make sure you do not have the Tracy debug bar disabled for modals in the module config: @adrian, I wonder if it would be better to not have Tracy disabled for modals by default, and people can disable it if they are finding the debug bar annoying. And perhaps spell it out that no debug bar = errors if you try and use a dump method. 2 Link to comment Share on other sites More sharing options...
adrian Posted March 5, 2019 Author Share Posted March 5, 2019 @Robin S - actually, I think you might be correct in this case. That was my initial thought, but some recent changes I made to Tracy should have actually prevented that error, so it threw me off. So I think it might be a combination of an older version of Tracy and the disabled in modal option. I agree that the defaults should be for Tracy to be on in all those modals/panels/iframes - I have made this change in the latest version. 3 Link to comment Share on other sites More sharing options...
bluellyr Posted March 6, 2019 Share Posted March 6, 2019 @Robin S, yes I had the Tracy Debugger disabled for modals, thank you for the tip. 1 Link to comment Share on other sites More sharing options...
adrian Posted March 6, 2019 Author Share Posted March 6, 2019 @bluellyr - could please let me know what version of Tracy you are running? Those errors should not have appeared on recent versions even with the modals disabled. Link to comment Share on other sites More sharing options...
bluellyr Posted March 6, 2019 Share Posted March 6, 2019 23 minutes ago, adrian said: @bluellyr - could please let me know what version of Tracy you are running? Those errors should not have appeared on recent versions even with the modals disabled. Hi, I am using the Tracy Debugger 4.17.18. Regarding the @Robin S remark about the having the "Tracy debug bar disabled for modals", I had the Tracy Debug disable for modals, can this be the cause of the error? Link to comment Share on other sites More sharing options...
Recommended Posts