adrian Posted February 8, 2021 Share Posted February 8, 2021 Hi all, I won't always post here when I update Tracy, but I will when I think the update is an important bug fix that you really should update to. There was a bug in the new 2.8 branch of core Tracy package that was sometimes causing recursion and really slow load times and sometimes memory exceeding errors. This has been fixed and is available in 4.21.41 of Tracy released today. 6 Link to comment Share on other sites More sharing options...
adrian Posted February 8, 2021 Author Share Posted February 8, 2021 v4.21.42 fixes an issue in the last version where the debug bar wasn't showing. Link to comment Share on other sites More sharing options...
adrian Posted March 28, 2021 Author Share Posted March 28, 2021 v4.21.52 fixes an issue with uploading images to repeatermatrix fields. This fix might also take care of a few other randomly seen bugs, although only time will tell with those. Regardless, I think this is a pretty important update for everyone. 3 Link to comment Share on other sites More sharing options...
adrian Posted December 21, 2021 Author Share Posted December 21, 2021 Hi everyone, I just committed to new versions. 4.22.23 - updates Tracy core to 2.8.10 4.23.0 - updates Tracy core to 2.9.0 I think everything should be fine in 4.23.0, but the new Tracy core 2.9 major version means that Tracy works without PHP sessions. This means that I was able remove several hacky workarounds to make this module compatible with PW's SessionHandlerDB module. I think I have everything working as expected, but wanted to also release a version with what I assume will be the last version of 2.8.x of the Tracy core. Please let me know if you find any issues with the new 4.23.0 version and if you have any problems that I can't solve quickly, you can always drop back to 4.22.23. Happy holidays! 5 Link to comment Share on other sites More sharing options...
adrian Posted January 31, 2022 Author Share Posted January 31, 2022 Not really an important update, but I wanted to highlight a new feature in the Console panel that lets you override it's default behavior where it handles and reports exceptions in the results pane. This is generally more convenient, but sometimes it's helpful to see the full stack trace in Tracy's "bluescreen". I've added a new checkbox to enable this. One important thing to note is that the bluescreen breaks the Console panel - to get it working again, you can minimise/hide the bluescreen (down arrow at the top right), or reload the page. I feel like I should be able to solve this so it doesn't break the Console panel, but for now, this is the workaround if you use this feature. 3 Link to comment Share on other sites More sharing options...
adrian Posted February 2, 2022 Author Share Posted February 2, 2022 Just an FYI that I have fixed the CSS issue with the Console panel when it triggers the bluescreen. 3 Link to comment Share on other sites More sharing options...
adrian Posted February 6, 2022 Author Share Posted February 6, 2022 In case folks didn't see this post it is definitely worth upgrading to the latest version, especially if you have large PW or Tracy log files. 2 Link to comment Share on other sites More sharing options...
adrian Posted February 19, 2022 Author Share Posted February 19, 2022 IMPORTANT!!!!! Hi everyone. I've made a few changes in the latest version that are worth mentioning, with the first one being a possible (although unlikely) security fix. 1) A couple of the panels (User Switcher and PageRecorder) store info in the module's config settings JSON, but when using these, it would also save any of the settings set via $config->tracy. In general this is probably just annoying, but in the case of the $config->tracy['forceIsLocal'] setting (introduced in Nov, 2021), this override could also be saved to the module's main config settings. Hopefully if you have used this setting, you have only used it locally with things like Docker where the normal isLocal() method fails, but please check your sites if you have ever enabled this somewhere live. In particular I know that @teppo and @netcarver (and I think @Robin S) have been using this feature, but pretty sure still only on local machines. 2) Even though that forceIsLocal setting is potentially dangerous, I decided to add it to the config settings (with a warning) as well so it's more transparent. Note that the debug bar displays a yellow warning icon on the left side if this setting is enabled. 3) I also added a table that lists out any $config->tracy overrides in an effort to make it more obvious what overrides in place. 4) I've revamped the Log panels further with better logic to control when the yellow / red colors are applied to the icon. I have improved the sort logic within each specific log file and I have added the yellow / red highlighting to the lines that are new since you last loaded them. I have also increased the default number of lines from 10 to 100 - this makes these panels much more useful and because of other recent changes it is now performant enough to do this. Note that upgrading from an old version of Tracy won't increase this, so you might want to do that yourselves in the settings. Thanks everything and sorry for the override settings getting save to the default one issue! 7 1 Link to comment Share on other sites More sharing options...
adrian Posted March 26, 2022 Author Share Posted March 26, 2022 Hi everyone, Just announcing a couple of new features that have actually been live for a week or so. 1) Guest dumps This allows any calls to bd() be() etc by guest users (regular visitors, webhook calls etc) to be logged and displayed in the Dumps Recorder panel. This panel will open automatically (on page reload) on another browser tab (where you are logged in). To turn this feature on, click the "Enable Guest Dumps" toggle button on the Panel Selector. The cog icon for this panel will change to orange to let you know it's on. There is no security risk having it enabled, but if you have a well trafficked site and it is left on, the file that stores the recorded dumps could become very large so you won't want to leave this on. This is my favorite new feature in a very long time so be sure to try it out. 2) Automatic includes Any files you place in /templates/TracyDebugger/includes/ will be automatically included. You could have a file with some helper functions or the file could have an include statement to pull in a site-wide functions file. This will give you access to any functions in these files via the Console panel. 9 Link to comment Share on other sites More sharing options...
adrian Posted April 2, 2024 Author Share Posted April 2, 2024 Just a note to say that I've added a new Page Meta section to the Request Info panel. This displays all meta entries for the page, along with links to open the entries for editing directly in Adminer. Speaking of Adminer - it was recently updated to AdminerEvo and I changed the way links from Tracy to open Adminer work - they now open the bar panel version which I believe is a much nicer experience than the standalone Adminer page. I also added links to edit the values of all fields within the Page Edit interface. If the field has multiple values, it will open Adminer showing all entries instead. This is of course optional, so you can visit the Adminer settings (now merged into Tracy's settings) to turn this off if you prefer. Please note that when you first upgrade, you will likely need to do a modules > refresh to get Adminer to load properly the first time. 4 1 Link to comment Share on other sites More sharing options...
adrian Posted April 25, 2024 Author Share Posted April 25, 2024 Lots more Adminer updates in the last couple of weeks, but the key things are: 1) Shift-click on the DB icon links will now open Adminer in full mode rather than with the Tracy panel 2) Page, template, field, etc ID within Adminer table views are now linked - note the page title (and path) and the link to edit that page - this comes from hovering on any of the id, parent_id, templates_id, created_users_id, modified_users_id, etc. These sorts of links are present throughout including linking to modules from the "modules" table, hanna_code, pages_meta, etc. It also works for all Page Reference field's page IDs in Profields Table "field_table" tables, Profields Combo, repeater, RM fields, etc. Hopefully you'll all find this as useful as I am. 7 Link to comment Share on other sites More sharing options...
adrian Posted July 10, 2024 Author Share Posted July 10, 2024 There have been a few useful updates to the PW and Tracy logs panels. 1) Display json as interactive "dumped" array. 2) Support for @Robin S awesome new CustomLogs module. 3) New options to exclude certain logs from being displayed. By default "modules", "sessions", and "file-compiler" are excluded. I think this is a major improvement because often these logs overwhelm the more important alert/warning/error type logs. 5 Link to comment Share on other sites More sharing options...
adrian Posted January 6 Author Share Posted January 6 Happy new year everyone! I've been working on adding multiple tab support for the console panel. It works in conjunction with the snippets panel so you can load up multiple snippets, or create any number of temporary (unsaved) tabs of code. Each tab has its own execution history stack and the last result for each tab is also maintained so you can flip between tabs to see the differences between results. It automatically names tabs like a typical code editor does: Untitled-1 initially, and then using the first line of code. Of course when you save the tab to a snippet, the tab name will be that of the snippet filename saved to disk. I'll push it live soon, but if anyone sees this and would like to test and provide feedback beforehand, please take a look at this branch: https://github.com/adrianbj/TracyDebugger/tree/console-tabs Thanks! 6 Link to comment Share on other sites More sharing options...
Robin S Posted January 6 Share Posted January 6 1 hour ago, adrian said: I've been working on adding multiple tab support for the console panel. This is awesome, thanks! A few things I noticed when testing: 1. After updating from a previous TracyDebugger version, the console window is only 1 line high and there's an error in the browser console. Probably a browser cache issue because if I do a hard reload the issues are gone. 2. Is it expected that clicking on a snippet that's already open in the console will open another copy of the snippet? Perhaps instead it should focus the already open tab? 3. The "Go Back" arrow never seems to become activated after executions or changes to the code. It's always greyed out for me. 4. Very minor and I think it's not a new thing, but for some reason the right arrow button is 1 pixel higher than the left arrow button. Link to comment Share on other sites More sharing options...
adrian Posted January 7 Author Share Posted January 7 Thanks @Robin S for the testing, much appreciated. 1) Sorry, I thought I had dealt with all upgrade issues but missed that one 2) Yeah, that is the intended behaviour - I was treating it as a way of loading up the saved version in a separate tab without losing any potential changes to the currently open version. I know it's different to how VSCode (and probably other editors) work though, so maybe I should reconsider. Anyone else have thoughts? 3) This was also an upgrade issue - the structure of the history stack needed updating but wasn't being overwritten if it already existed. 4) I am not seeing this pixel issue - any chance you could help narrow that down: Latest commit should fix 1 & 3 Thanks again. 1 Link to comment Share on other sites More sharing options...
adrian Posted January 7 Author Share Posted January 7 @Robin S - just occurred to me that my fix for the history issue won't work if you upgrade your already upgraded version, so if you do that, please delete these localStorage items manually so that they will be automatically re-created in the right format. https://github.com/adrianbj/TracyDebugger/commit/9d7d42501ead93460d27cda4829eed780239c2aa 1 Link to comment Share on other sites More sharing options...
Robin S Posted January 7 Share Posted January 7 @adrian, thanks, the history is working for me now. 7 hours ago, adrian said: I am not seeing this pixel issue - any chance you could help narrow that down I think this is caused by a combination of the button height being in fractional pixels and the scaleX(-1) transform on the right arrow. This causes Chrome to round the two arrow buttons to different numbers of whole pixels. There would be a several different ways to solve this, but perhaps the easiest thing would be to use the FontAwesome right arrow character for second arrow button rather than flipping a left arrow character. You'd also then tweak the margin and border on that button seeing as it would no longer be flipped. Leaving the coloured border on all sides and adjusting to margin-left: -12px looks good to me. 1 Link to comment Share on other sites More sharing options...
adrian Posted January 7 Author Share Posted January 7 Thanks @Robin S - I have fixed the history forward icon - I honestly have no idea why I used the left arrow and flipped it :) I have also changed the behaviour if a snippet is already open in a tab and also added scroll into view for the tabs as needed (if lots are open and some are out of view due to horizontal scrolling). Anything else you can see that needs attention before release? Link to comment Share on other sites More sharing options...
Robin S Posted January 7 Share Posted January 7 48 minutes ago, adrian said: Anything else you can see that needs attention before release? No, everything is good. A really useful set of features, thanks! 1 Link to comment Share on other sites More sharing options...
adrian Posted January 16 Author Share Posted January 16 Well, it took a long time, but the Console tabs are now available in the latest version - turns out there were actually a lot of things left to do which took way longer than I expected. If anyone finds any issues, please let me know. Please note that you will have to do a hard reload to get the tab CSS working - the way the core Tracy package loads CSS I can't seem to figure out how to bust the caching of it. 4 1 Link to comment Share on other sites More sharing options...
Robin S Posted February 2 Share Posted February 2 @adrian, not sure what others think, but personally I like this style of tabs... ...more than the style in recent updates. In the previous version it's clearer that they are tabs, whereas in the newer version I find it all blends in with the code window. Maybe if the tab bar had a lighter background colour so it's more distinct? 1 Link to comment Share on other sites More sharing options...
adrian Posted February 3 Author Share Posted February 3 Hi @Robin S - I have tweaked things in the latest commit to make the tabs a little taller so that the tab labels are further from the code which I think helps, but I have also added the ability to switch to a light theme if you prefer (in the Console settings). If you still don't like the light theme option, feel free to tweak it, or submit a PR with an additional theme option if you'd like. Hope that helps. 2 Link to comment Share on other sites More sharing options...
Robin S Posted February 3 Share Posted February 3 Thanks @adrian. The new light theme is nice. I used that as a starting point and made a few other opinionated changes (that are possibly only to my tastes and nobody else's) which I've added as a "Kiwi" theme and submitted as a pull request. I realise that with these extra changes there's a chance it might need tweaking if you make future updates to the Console panel, so I'm happy to take responsibility for maintaining the theme styles as needed into the future. An issue that I noticed when playing with the tabs: if I open one of my saved snippets that includes the "Code prefix" that is designed to be hidden in the console (in my case it has the PW namespace and PHPDoc comments for the API variables) the code is immediately detected as changed, which causes the alert when I try and close the tab. 1 Link to comment Share on other sites More sharing options...
adrian Posted February 4 Author Share Posted February 4 Hey @Robin S - thanks for the new theme - I've committed it already. As for the unsaved changes issue, I can't seem to replicate that here when I add something in the code prefix setting. I don't normally use that option but been playing around and not seeing an issue at the moment and as far as I can tell the code prefix should be removed before loading into localstorage where the comparison is done. Perhaps there are some weird characters or a windows line break or something which isn't being stripped? This is the file that is called via AJAX to get all snippets: https://github.com/adrianbj/TracyDebugger/blob/master/includes/ConsoleSnippets.php if you feel like doing some comparisons, or if you'd like to post the contents of your code prefix field I can also take a look here. A bit off topic, but just out of interest for you - not sure if you've ever looked, but the code that is actually run via Tracy is stored here: /site/assets/cache/TracyDebugger/consoleCode.php Link to comment Share on other sites More sharing options...
adrian Posted February 4 Author Share Posted February 4 @Robin S - I just played with this a little more adding this - not sure if it's actually what you are using, but I've seen you use it before so thought it would be a good starting point. But still I can't reproduce the issue you are seeing 😕 <?php namespace ProcessWire; //<editor-fold desc="API variables"> /** * @var Config $config * @var Fieldgroups $fieldgroups * @var Fields $fields * @var Languages $languages * @var Modules $modules * @var Page $page * @var Pages $pages * @var Paths $urls * @var Permissions $permissions * @var ProcessWire $wire * @var Roles $roles * @var Sanitizer $sanitizer * @var Session $session * @var Templates $templates * @var User $user * @var Users $users * @var WireCache $cache * @var WireDatabasePDO $database * @var WireDateTime $datetime * @var WireFileTools $files * @var WireInput $input * @var WireLog $log * @var WireMailTools $mail * @var ProCache $procache * **/ //</editor-fold> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now