adrian

Tracy Debugger

Recommended Posts

Just now, matjazp said:

Just wanted to upgrade her, but I got compile error: "Cannot declare class TracyDebugger, because the name is already in use", File: ...\modules\TracyDebugger\TracyDebugger.module.php:24  

I was worried that might happen. @bernhard added .php to the TracyDebugger.module file so that intellisense in vscode could work its magic. I thought I might starting adding the php extension to all my modules files because .module really is a silly extension in my mind. 

You'll be able to solve the issue my deleting the .module version. Same goes for ProcessTracyAdminer.module.

I am curious what method you used to upgrade. I would have thought that the PW Upgrades module would handle this and a git update approach should also work. Updating via modules > add new should also work. Did you just unzip and copy?

Share this post


Link to post
Share on other sites
2 minutes ago, matjazp said:

I used PW upgrades module...

Edit: Adminer 4.7.0 (released 2018-11-24)

Weird - I just tested upgrading Tracy with the PW Upgrades module and it deleted the old .module versions automatically. I have no idea why it wouldn't have worked the same for you.

Thanks for the Adminer update note.

Share this post


Link to post
Share on other sites
45 minutes ago, adrian said:

Well it took several hours of discussions with @bernhard and lots of back and forwards on the best way to do things, but we've finally committed the "WebHooks" panel he posted about above.

Awesome work @bernhard and @adrian. Hopefully one day I'll get to test all these wonderful stuff being added. That might be a while, given that it's only today that I discovered the Tracy console can be opened in a new window! 😁

  • Like 2

Share this post


Link to post
Share on other sites
1 minute ago, kongondo said:

I discovered the Tracy console can be opened in a new window!

Interesting because I actually purposely made this not obvious by hiding the icon that triggers the new window mode. Are you using SHIFT+Click to trigger this or is the icon not hidden for you?

The reason I "disabled" this functionality is that it was a bit painful to get layout to work properly in this mode. And actually, the Console panel is completely broken for me at the moment in this mode at the moment. Are you running a much older version?

Share this post


Link to post
Share on other sites
37 minutes ago, adrian said:

Are you using SHIFT+Click to trigger this or is the icon not hidden for you?

I'm using the icon; it's not hidden for me.

37 minutes ago, adrian said:

Are you running a much older version?

On this machine I'm running 4.8.24

38 minutes ago, adrian said:

Interesting because I actually purposely made this not obvious by hiding the icon that triggers the new window mode.

The new window came handy today. I needed to see different windows at the same time and docked, the console was in the way, plus I just couldn't make it bigger. I've done it before, but can't remember how :-).

  • Like 1

Share this post


Link to post
Share on other sites
58 minutes ago, kongondo said:

On this machine I'm running 4.8.24

That's ancient (10 months old) - you are missing out on so much 🙂 but that explains why the icon is not hidden.

58 minutes ago, kongondo said:

I just couldn't make it bigger. I've done it before, but can't remember how :-).

There are lots of new options for making the Console panel larger - you can maximize the panel, but you can also fullscreen mode the editor/results panes.

You can also "rollup" any Tracy panels by double-clicking on their title bar - nice to get it out of the way quickly.

I'll see about restoring the "window" option, but no promises - it's been painful!

 

Share this post


Link to post
Share on other sites
1 hour ago, matjazp said:

Edit: Adminer 4.7.0 (released 2018-11-24)

New version of Tracy includes 4.7.0

  • Like 3

Share this post


Link to post
Share on other sites
1 hour ago, adrian said:

Weird - I just tested upgrading Tracy with the PW Upgrades module and it deleted the old .module versions automatically. I have no idea why it wouldn't have worked the same for you.

I experienced the same issue using the PW Upgrades module. I think it is Windows-specific and relates to a bug introduced by Ryan trying to resolve this issue: https://github.com/processwire/processwire-issues/issues/704
In recent dev versions PW is not able to delete files on Windows. See also: 

 

  • Like 3

Share this post


Link to post
Share on other sites
52 minutes ago, adrian said:

That's ancient (10 months old) - you are missing out on so much 🙂 but that explains why the icon is not hidden.

In fact I misspoke in my previous post. I've been using the new version but on a different local site. On the site I'm currently on, I have the older Tracy :-). 

52 minutes ago, adrian said:

There are lots of new options for making the Console panel larger

Yeah; now I seem to remember this. It was of course on the other site where I had the new Tracy. I even played around with Adminer, I recall. 

52 minutes ago, adrian said:

You can also "rollup" any Tracy panels by double-clicking on their title bar - nice to get it out of the way quickly.

Good to know, thanks.

  • Like 1

Share this post


Link to post
Share on other sites
5 minutes ago, kongondo said:
55 minutes ago, adrian said:

 

In fact I misspoke in my previous post. I've been using the new version but on a different local site

Does this mean you are seeing the "open in window" icon on the new version? It should look like this:

image.png.3fedeb8ea66afdad58a54df8e97b6baa.png

Just the Maximize/Restore icon and the close icon.

The open in window icon should be hid by this rule:

https://github.com/adrianbj/TracyDebugger/blob/077b5c26aea42de451dcd94d97ae186d3bbf8529/styles.css#L830-L833

Share this post


Link to post
Share on other sites
7 minutes ago, adrian said:

Does this mean you are seeing the "open in window" icon on the new version? It should look like this:

No. It means I'm using different versions of Tracy on different sites (multisite) on the same machine 😃.

 

Edit: Maybe this old version is why Tracy is not appearing in modal windows or that has always been the case?

Edited by kongondo
  • Like 1

Share this post


Link to post
Share on other sites

Adrian please save your time and forget about the open in new window stuff. The new options are much better!

Share this post


Link to post
Share on other sites

A couple of updates to the new RequestLogger panel.

You can now define which types of request methods are logged: GET, POST, PUT, DELETE, PATCH. By default, all are checked, but I think in most cases unchecking GET is probably helpful as it will prevent page views from being logged.

image.png.acef35a02d410f2d818bab775bdfe240.png

You can now use this panel on non-ProcessWire pages, so if you use a php script like payment_confirmation.php in the root of your site, so long as it bootstraps PW (include ./index.php), it will let you log and retrieve request data. The only catch is that you need to trigger the logging manually by adding:

$page->logRequests();

to the script file. 

Visit the page and enable logging (as with any normal PW page) and you're good to go.

The only weird thing at the moment with this is that the logged url will be /http404/ but otherwise it works as expected.

Let me know if you make use of this approach and if you find any issues.

BTW, I still need to add docs for the Request Logger, API Explorer, and Adminer panels to https://adrianbj.github.io/TracyDebugger/ - I've been slack on this. Anyone out there like doing documentation and would like to help 🙂

  • Like 2

Share this post


Link to post
Share on other sites
2 hours ago, adrian said:

BTW, I still need to add docs for the Request Logger, API Explorer, and Adminer panels to https://adrianbj.github.io/TracyDebugger/ - I've been slack on this. Anyone out there like doing documentation and would like to help 🙂

I could maybe do that for RequestLogger over christmas...

  • Like 2

Share this post


Link to post
Share on other sites

Hello to all,

I've just tried updating the module and got an error. I then deleted it completely to start all over again (on my local site), and as soon as it is downloaded, even if I choose to leave it uninstalled, I still have the same fatal error (I must delete the TracyDebugger folder in my modules completely to be able to access my site). Here's the error :

	require_once(): Failed opening required '/home/celfred/PlanetAlert/site/modules/TracyDebugger/panels/TemplateEditorPanel.php' (include_path='.:/usr/share/php')
	

And I'm sorry to say I have no idea what to do... So if one of you could give me a hint, that would be great. I was using TracyDebugger more and more (for minor debugging, I guess you can tell from my question) but I would like to use it more 🙂 

Share this post


Link to post
Share on other sites

@celfred - does that file actually exist?

How are you upgrading / installing Tracy ? It's always safest through Setup > Modules > New or the PW Upgrades module.

Also, if it's uninstalled and you're getting that error, then you probably need to do a Modules > Refresh

Share this post


Link to post
Share on other sites

@adrian : Well, I am upgrading through Setup > Modules > New and I type the className. Everything downloads and then I click 'Install now'.

I've checked the path and no, the file doesn't exist.

I've tried the Modules > Refresh and re-installed Tracydebugger : same problem. Here's the line mentionned that triggers the issue :

	File: .../modules/TracyDebugger/TracyDebugger.module.php:1341
	

Thanks for your quick reply.

Edit : I've checked on Github in panels folder, and there is no TemplateEditorPanel.php file... I really don't get it...

Share this post


Link to post
Share on other sites
58 minutes ago, celfred said:

@adrian : Well, I am upgrading through Setup > Modules > New and I type the className. Everything downloads and then I click 'Install now'.

I've checked the path and no, the file doesn't exist.

I've tried the Modules > Refresh and re-installed Tracydebugger : same problem. Here's the line mentionned that triggers the issue :


	File: .../modules/TracyDebugger/TracyDebugger.module.php:1341
	

Thanks for your quick reply.

Edit : I've checked on Github in panels folder, and there is no TemplateEditorPanel.php file... I really don't get it...

Oh now I see what's going on - the Template Editor panel hasn't existed in forever 🙂 Your module settings must be configured to try to load it still. An uninstall/reinstall should remove those settings though. Maybe you had used the Panel Selector and "Sticky" selected the template editor? Could you please delete the "tracyPanelsSticky" cookie from your browser and let me know if that works.

Share this post


Link to post
Share on other sites

@celfred - I just committed a new version that won't error even if there are old settings with panels that no longer exist, so please try updating and let me know how you go.

Share this post


Link to post
Share on other sites

@adrian I was indeed about to tell you I'm updating from... 3.6.9 ! I managed to get back the old version from my remote site).

So far, I've tried what you said :

  • Starting with a 'regular' update trhough the module page, clicking on update. It detects the 4?15.4 version. It downloads and then still triggers the same error.
  • Then, I went to check the cookies. I couldn't find the TracyPanelSticky you mentionned, but trying to erase all Tracy cookies (and eventually deleting all my localhost cookies), and also deleting the TracyDebugger folder in my modules folder, and deleting the TracyDebugger folder in my assets/cache/Filecompiler/site/modules... still the same result 😞 In short, I have deleted all traces I could find of TracyDebugger and tried re-installing 4.15.4 but the error persists.

You were perfectly right about the 'sticky panel' : I remember I had the var-dump panel sticky before updating.

Thanks a lot for your help.

Share this post


Link to post
Share on other sites

@celfred - sorry, looks like I forgot to commit that new 4.15.5 version - please try updating now - this new version should prevent the error.

  • Thanks 1

Share this post


Link to post
Share on other sites

I updated PW from 3.0.111 to 3.0.121 today.

I've got a compile error when I wanted to update Tracy as well:

File: .../modules/TracyDebugger/TracyDebugger.module.php:24
class TracyDebugger extends \ProcessWire\WireData implements \ProcessWire\Module, \ProcessWire\ConfigurableModule {

https://dev.foo.com/backstage/module/download/
PHP 7.2.12
Apache/2.4
Tracy 2.5-dev


tracy-error-exception.png.57db11b8bec6e4550f99abe95a2c662a.png

Edited by dragan
added screenshot

Share this post


Link to post
Share on other sites

Hi @dragan - does a Modules > Refresh take care of things for you?

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By anderson
      Hi all,
      I'm a new to website building. Learned some CRASH course of js,jquery,php. Then I found CMS. Still learning around forum, youtube....
      Anyway, please help me with some beginer questions:
      1, About template - please correct me if I understand wrong : every page should be (or recommended) built on a template. So if in total I'll have 10 pages, 2 of them have same layout, I'll need 9 templates.  And, what fields a page includes, is not defined in page, but defined in the template that page uses. 
      2,  Where to see what modules I've installed? is it in "Modules - Site"? 
      3, I installed "PageTable Extended", then what?  As in a youtube tutorial, it should appear in Setup tab, but it doesn't.  What's in there: templates,fields,logs,comments. (I installed "Uikit 3 site_blog profile".)
      4, I did a search in Processwire website for the famous "repeater matrix" module, and can not find it, there's a Repeater, as well as a Matrix. Is it not a module?
      5, I watched this youtube tuts: https://www.youtube.com/watch?v=IHqnLQy9R1A
      Anybody familiar with this tuts please help: 
      After he analysed a target webpage layout he wanted to mimic, he created some fields, some template, then based on those he created a page and input some "content" in there, then clicked "view", it's just some text. So, here comes my question, he copied a folder "assets" (subfolders are: css,fonts,js,img) over, then the page have the appearance/layout he wanted to mimic. Where does that assets folder come from?
      Appreciate any help.
    • By mtwebit
      I've created a set of modules for importing (manipulating and displaying) data from external resources. A key requirement was to handle large (100k+) number of pages easily.
      Main features
      import data from CSV and XML sources in the background (using Tasker) purge, update or overwrite existing pages using selectors user configurable input <-> field mappings on-the-fly data conversion and composition (e.g. joining CSV columns into a single field) download external resources (files, images) during import handle page references by any (even numeric) fields How it works
      You can upload CSV or XML files to DataSet pages and specify import rules in their description.
      The module imports the content of the file and creates/updates child pages automatically.
      How to use it
      Create a DataSet page that stores the source file. The file's description field specifies how the import should be done:
      After saving the DataSet page an import button should appear below the file description.

      When you start the import the DataSet module creates a task (executed by Tasker) that will import the data in the background.
      You can monitor its execution and check its logs for errors.

      See the module's wiki for more details.
      The module was already used in three projects to import and handle large XML and CSV datasets. It has some rough edges and I'm sure it needs improvement so comments are welcome.
    • By dreerr
      TemplateEnginePug (formally TemplateEngineJade)
       
      This module adds Pug templates to the TemplateEngineFactory. It uses https://github.com/pug-php/pug to render templates.
      doctype html html(lang='en') head meta(http-equiv='content-type', content='text/html; charset=utf-8') title= $page->title link(rel='stylesheet', type='text/css', href=$config->urls->templates . 'styles/main.css') body include header.pug h1= $page->title if $page->editable() p: a(href=$page->editURL) Edit Project on GitHub: github.com/dreerr/TemplateEnginePug
      Project in modules directory: modules.processwire.com/modules/template-engine-pug/
       
      For common problems/features/questions about the Factory, use the TemplateEngineFactory thread.
       
    • By Robin S
      Pages At Bottom
      Keeps selected pages at the bottom of their siblings.
      A "bottom page" will stay at the bottom even if it is drag-sorted to a different location or another page is drag-sorted below it (after Page List is refreshed the bottom page will still be at the bottom).
      Newly added sibling pages will not appear below a bottom page.
      The module also prevents the API methods $pages->sort() and $pages->insertAfter() from affecting the position of bottom pages.
      Note: the module only works when the sort setting for children on the parent page/template is "Manual drag-n-drop".
      Why?
      Because you want some pages to always be at the bottom of their siblings for one reason or another. And someone requested it. 🙂
      Usage
      Install the Pages At Bottom module.
      Select one or more pages to keep at the bottom of their siblings. If you select more than one bottom page per parent then their sort order in the page list will be the same as the sort order in the module config.

       
      https://github.com/Toutouwai/PagesAtBottom
      https://modules.processwire.com/modules/pages-at-bottom/
    • By Robin S
      Another little admin helper module...
      Template Field Widths
      Adds a "Field widths" field to Edit Template that allows you to quickly set the widths of inputfields in the template.

      Why?
      When setting up a new template or trying out different field layouts I find it a bit slow and tedious to have to open each field individually in a modal just to set the width. This module speeds up the process.
      Installation
      Install the Template Field Widths module.
      Config options
      You can set the default presentation of the "Field widths" field to collapsed or open. You can choose Name or Label as the primary identifier shown for the field. The unchosen alternative will become the title attribute shown on hover. You can choose to show the original field width next to the template context field width.  
      https://github.com/Toutouwai/TemplateFieldWidths
      https://modules.processwire.com/modules/template-field-widths/