adrian Posted August 30, 2016 Author Posted August 30, 2016 20 hours ago, bernhard said: I'm really thankful for what you built here as i learned a lot and i don't know where i would be today without all the help of tracy opening my eyes. maybe it's just me because tracy came in right in time and i've never used xdebug or the like - but i have the feeling i'm not the only one Just wanted to say a special thanks for this comment - I am very glad to hear it's been so useful to you - several of you have also been instrumental in making Tracy as useful as it is, so thanks to you all as well! 2
tpr Posted August 30, 2016 Posted August 30, 2016 Here is my post mentioning the idea of file-based settings. I think this could be useful for Tracy too. My current implementation in AOS is very basic, that could be improved with eg. saving settings file with domain suffix (settings-mydomain.com.php), etc. 1
szabesz Posted August 30, 2016 Posted August 30, 2016 (edited) 6 minutes ago, tpr said: I think this could be useful for Tracy too. For ProcessWire too How about a core module that supports it? Or at least a 3rd party module that is a joined effort and can be used in such cases by module devs? Edited August 30, 2016 by szabesz extra o :P
blynx Posted August 31, 2016 Posted August 31, 2016 Hej, is there another way (one-liner) to use TracyDebugger in modules instead of "use\Debugger" & "Debugger::barDump(...)"? (working on a process module, namespace Processwire) cheers, Steffen
adrian Posted August 31, 2016 Author Posted August 31, 2016 18 minutes ago, blynx said: Hej, is there another way (one-liner) to use TracyDebugger in modules instead of "use\Debugger" & "Debugger::barDump(...)"? (working on a process module, namespace Processwire) cheers, Steffen bd() and all the other shortcuts are available in the global namespace so you shouldn't need to do anything special. Is that not working for you? Does it then actually work with use\Debugger" & "Debugger::barDump(...) ? If so, could you perhaps give me more info about where in the module you are trying to make the call? 2
blynx Posted August 31, 2016 Posted August 31, 2016 shzzzzz .... yes it is just there "bd()" - don't know what went wrong here ^^ I was working in the execute() function of a Process module Thanks! 1
adrian Posted August 31, 2016 Author Posted August 31, 2016 Glad it's working. Just a couple of FYIs for using Tracy with modules in case you missed them from above. If it's an autoload module, then sometimes Tracy isn't loaded before the module (nothing I can do about this until Ryan gets back to me). The other thing is that sometimes it pays to use the Dumps Recorder panel with "Preserve Dumps" checked as sometimes things can get lost during redirects within modules. This way, a simple reload will refresh the content of that panel and you'll have your dump. 1
adrian Posted September 1, 2016 Author Posted September 1, 2016 I have just added a new config option for hiding the debug bar in modals. @tpr and I discussed this above and we decided to show in regular modals, but hide in inline ones, but the tripling up of the bar when editing a page in a modal and then editing an image from that page was driving me nuts, so now the default is to have it disabled in both modal types, but you can uncheck these if you want. 3
adrian Posted September 2, 2016 Author Posted September 2, 2016 Just wanted to let everyone here know that the Console panel just received a fix regarding UTF8 encoding: The first time you load the console after the update you'll see your code as base64 encoded, but once you enter something new it will work fine after that. Please let me know if you notice any other problems. 1
gmclelland Posted September 2, 2016 Posted September 2, 2016 Heads up... I just downloaded a fresh 3.0.33 devns and the page tree was failing to load everytime I enabled TracyDebugger.
adrian Posted September 2, 2016 Author Posted September 2, 2016 Thanks @gmclelland - but I have been running 3.0.33 for a couple of hours now also and not seen this. Looks like an ajax error - any chance you could look at the network tb of the dev console and see if you can find the error?
gmclelland Posted September 2, 2016 Posted September 2, 2016 I see the problem... I installed the site with pwshell and didn't set a timezone. In the response there was this warning Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. As soon as I set the timezone in the config.php everything started working. Sorry for the alert 1
adrian Posted September 2, 2016 Author Posted September 2, 2016 No problem - thanks for the explanation. Seems like one of those rare times I can see a valid use for the silence operator. I think I'll add it to all the strtotime calls in Tracy which should at least prevent the error for you. 1
adrian Posted September 3, 2016 Author Posted September 3, 2016 I have spent some more time on the Module Disabler panel to make it easy to restore things if disabling a particular module breaks your site. Ryan has mentioned that there are some situations where this may happen and there is no way to avoid it, so I think this panel is now the safest way to disable modules for testing purposes. Whenever you disable any modules, a backup of the "modules" database table is automatically saved. To restore you have two choices: Copy "/site/assets/cache/TracyDebugger/restoremodules.php" to the root of your site and load it in your browserOR Execute "/site/assets/cache/TracyDebugger/modulesBackup.sql" manually (via PHPMyAdmin, the command line, etc) After you run the restoremodules.php file, it will automatically remove the backup file and itself from all locations. Please let me know if you notice any problems or have suggestions for improving this. 1
adrian Posted September 4, 2016 Author Posted September 4, 2016 A few more updates to the Module Disabler. The "restoremodules.php" script now works without bootstrapping PW, so it will work even if a disabled module has resulted in a fatal error. Also added restore instructions to the panel. 1
tpr Posted September 5, 2016 Posted September 5, 2016 It seems that the Dumps Recorder doesn't support adding titles to dumps, eg. this one results in error in panel: bd('hell world', 'title');
adrian Posted September 5, 2016 Author Posted September 5, 2016 4 hours ago, tpr said: It seems that the Dumps Recorder doesn't support adding titles to dumps, eg. this one results in error in panel: bd('hell world', 'title'); Works here. What error are you getting?
tpr Posted September 5, 2016 Posted September 5, 2016 Well, not sure what's going on. Now it works fine, though I updated to 2.92 and then reverted to 2.87. Works fine here anyways I got 'Error in DumpsRecorderPanel...' text in the panel itself. Maybe what I was about to dump was so dumb that it would need a DumbsRecorder instead 1
adrian Posted September 5, 2016 Author Posted September 5, 2016 1 minute ago, tpr said: I got 'Error in DumpsRecorderPanel...' text in the panel itself. Maybe what I was about to dump was so dumb that it would need a DumbsRecorder instead Yeah - sounds like it must have been an error in the code you typed. 3 minutes ago, tpr said: Well, not sure what's going on. Now it works fine, though I updated to 2.92 and then reverted to 2.87. Works fine here anyways Just to clarify - you are back on 2.9.2 now and it's working fine in 2.9.2? 1
adrian Posted September 6, 2016 Author Posted September 6, 2016 I know this is a little OT (ok, maybe a lot OT), but I just discovered the $sanitizer->testAll() option - maybe you guys all noticed it when it was introduced, but I missed it Anyway, I think it is very handy and a great use of the console panel Finding this I did notice that the list is not complete at the moment though (https://github.com/ryancramerdesign/ProcessWire/issues/2028) Anyway, hope someone finds this useful like I did! 3
bernhard Posted September 6, 2016 Posted September 6, 2016 cool, thank you that's one of the uncountable things i read in the blog and did not remember as it was not interesting enough to me at that time... @consolei really love it. i use it not only for learning (try&error, checking things) processwire but also PHP in general (the usual stuff i can't remember by heart like strftime, substr and all that..) 2
szabesz Posted September 6, 2016 Posted September 6, 2016 21 minutes ago, adrian said: $sanitizer->testAll() Wow, that's cool and quite useful too. Thanks for educating us! 1
Juergen Posted September 7, 2016 Posted September 7, 2016 Hello Adrian, Tracy makes problems during updates of modules if it is in strict mode (show warnings as errors), because there are several warnings of the PW core files. I use it in strict mode and I always have to disable Tracy Debugger if I want to update a module. Otherwise the module will not be updated if I skip the warning. So it would be a nice addition if you add an enable/disable link for Tracy Debugger at the bottom like AdminOnSteroids module (see image below). This makes the workflow much easier. Best regards 1
szabesz Posted September 7, 2016 Posted September 7, 2016 13 minutes ago, Juergen said: if you add an enable/disable link for Tracy Debugger at the bottom like AdminOnSteroids module (see image below) As opposed to AOS, we can enable Tracy for both frontend and admin, so the disable feature would be nice to have on its main panel too, which I have already missed a few times. 1
Recommended Posts