Jump to content
adrian

Tracy Debugger

Recommended Posts

7 hours ago, bernhard said:

I still have the bug on the AOS language switcher z-index. Any news on this?

I think this is something that @tpr needs to take care of in AOS, but if someone know better, please correct me.

8 hours ago, bernhard said:

On the config var the description column is very large, leading to a horizontal scrollbar. Maybe it would make sense to use text-overflow: ellipsis; here?

I actually think I am OK with the horizontal scroll in this case. I'd rather be able to read it all and I don't want to go with line break either. If others think this is annoying, please let me know and I'll reconsider.

8 hours ago, bernhard said:

Is it intended that the links to the api ref opens in the same window? I know we can middle-click, but I wonder if it was better to open it in a new tab by default?

Over the last few years I have come to really dislike forced new window/tab links unless there is a chance of data loss which I guess in this situation is possible if you're editing a page at the time, so I have introduced a config option under the Misc section to let you guys decide. This is the same as the option for the PW Info panel. I have also added it to the Captain Hook panel as well. So guys can choose what you prefer.

7 hours ago, gmclelland said:

How about adding a full screen button to the API Explorer panel?  Like it is with the Console panel.

I have added this to the latest version - also added to the Captain Hook panel as well.

9 hours ago, bernhard said:
10 hours ago, adrian said:

I am actually thinking about a link from the property to open the Console panel with the $object->property wrapped in a d() call, eg:

Sorry, I don't get what you are talking about

It's a link to automatically insert that code into the Console panel so you can easily dump it to get the value. Maybe it will make more sense when it's done 🙂

  • Thanks 1

Share this post


Link to post
Share on other sites

Hi Adrian -  is the gap between the dump heading and the dump output deliberate? I think it would look better without a gap.

2018-10-25_110001.png.5f1a32b96c7d23e276bbd0f7eea24ee7.png

  • Like 1

Share this post


Link to post
Share on other sites
9 minutes ago, Robin S said:

Hi Adrian -  is the gap between the dump heading and the dump output deliberate? I think it would look better without a gap.

2018-10-25_110001.png.5f1a32b96c7d23e276bbd0f7eea24ee7.png

Recently introduced, unintentional bug 🙂

I have just committed a fix, although no version number bump just yet because I am working on other changes.

  • Like 1

Share this post


Link to post
Share on other sites

New version of the API Explorer. 

1) It now shows all core classes (rather than the previous select list), but it excludes those classes with matching API variables avoid duplicate content.

2) By default, methods inherited from Wire, WireArray, or WireData are no longer shown which dramatically decreases the size of the panel and makes it much easier to find what you are looking for. However if you want to see all methods, then you can check the new "Include inherited methods" config setting.

I would really appreciate some feedback on this new version. I am thinking about maybe showing inherited methods for the core classes, but not for the API variables (objects), but I'd really like to get thoughts from you guys on what you think will be most useful - I think it's a challenge to balance usefulness and clarity.

Thanks!

Share this post


Link to post
Share on other sites

Another question for you all - in addition to the core objects and classes, would you find it useful to also see these for core and site module classes as well? Maybe optional?

Share this post


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

for core and site module classes as well? Maybe optional?

+1 for optional 🙂

Share this post


Link to post
Share on other sites

Lots of improvements to the API Explorer have been committed and as far as I can tell it should now include all methods and properties for all PW objects and classes.

It's now definitely ready for primetime although I am sure I'll think of other improvements to add 🙂

Honestly I am learning about lots of methods/properties I didn't know about!

Hopefully you guys will find it the best first stop for api docs.

  • Like 4

Share this post


Link to post
Share on other sites

Brand new numParents() method from the latest PW dev showing up in the API Explorer 🙂

image.thumb.png.328370a51d9985799cbb34c153d9d1cc.png

  • Like 3

Share this post


Link to post
Share on other sites

Inline with my last comment, I am thinking about adding an alert (with orange icon) when there are new properties/methods available after you upgrade to a new version of PW. Haven't decided on the exact interface yet, but if you like the idea and have any thoughts, feel free to suggest, but probably a simple note at the top of the panel detailing those new options and also highlighting in the tables. Probably with an option to "acknowledge" that you've seen the options to remove the notice. Something like that anyways.

  • Like 2

Share this post


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

Probably with an option to "acknowledge" that you've seen the options to remove the notice. Something like that anyways.

+1, yep, it would be great to be able to decide when to dismiss it. I tend not to heave time to read all such things when they happen to pop-up. Also, if we could copy/paste them, then I could save it into my notes for later inspection.

Share this post


Link to post
Share on other sites

@adrian

While wokring on a site I faced a problem with hook and bd call in it.

wire()->addHookAfter("Page(template=blog-category)::path", function($e) {
	$page = $e->object;
	bd($e);
	$pages = wire('pages');
	$user = wire('user');
	$language = $user->language;
	$langSegment = $pages->get("/")->localPath($language);
	$pageName = $page->localName($language, true);
	$e->return = $langSegment . "$pageName/";
});

Such hook leads to 'Fatal error: Allowed memory size'. I have tested it on three different installations, got the same result even on clean installation with only TracyDebugger module. PW 3.0.117 and 3.0.116, the latest module version, PHP 7.2.4. 

Share this post


Link to post
Share on other sites

Hi @Zeka - I think is probably just a result of trying to bd() lots of complex PW objects. Try replacing the bd call with bd($e->object->title) and see if that helps. Or maybe you could use bd($e, [1]) as a shortcut to reduce the maxDepth of the dump.

The main thing is I don't think it's a problem with Tracy but rather just how much content is being dumped. How many bd() calls are being made in this hook in your setup?

Share this post


Link to post
Share on other sites

@adrian

Thanks, reducing of the maxDepth depth helped. But it's strange, as in earlier versions I have used bd calls in such hooks without maxDepth tuning. 

Share this post


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

@adrian

Thanks, reducing of the maxDepth depth helped. But it's strange, as in earlier versions I have used bd calls in such hooks without maxDepth tuning. 

Would you mind checking what is the last old version of Tracy that doesn't have an issue with that hook in your setup? If there has been some change, I'd love to help sort it out. Perhaps it's when I introduced the debugInfo / Iterator / Full Object tabs in the dumped results? This is the commit where this was first introduced: https://github.com/adrianbj/TracyDebugger/commit/104a9457ec1eae78b46d139a631f798b2a042bf0

Share this post


Link to post
Share on other sites

@adrian

I tried such hook (without conditions) on PW 3.0.105 and TD 4.10.22 and it works as expected. I got 360 dumps. So, yes, probably it is somehow relative to new tabs in dump panel.

	wire()->addHook("Page::path", function($e) {
		bd($e);
		$page = $e->object;
		$e->return = "/{$page->name}/";
	});

 

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for doing that test. Now the problem is that I am not really sure what to do. You do have the option to change what tabs are output:

image.png.cf5090d4167a23f526a2a19238218830.png

so I guess if you're coming across this a lot and don't want to (or can't increase) the PHP memory limit, then perhaps the best option is to drop back to one tab. Would you mind confirming that works for me?

 

Share this post


Link to post
Share on other sites

[offtopic]

just wanted to mention that always when I log into a site with an older version of tracy I realize how much better the new not-so-colored theme is, thanks for that @adrian and @tpr 🙂 

  • Like 3

Share this post


Link to post
Share on other sites
On 10/24/2018 at 11:19 PM, adrian said:
On 10/24/2018 at 1:54 PM, bernhard said:

I still have the bug on the AOS language switcher z-index. Any news on this?

I think this is something that @tpr needs to take care of in AOS, but if someone know better, please correct me.

@bernhard Yesterday I tried to replicate this but couldn't. Have you modified z-index in tracy, or have set sticky header in aos?

  • Thanks 1

Share this post


Link to post
Share on other sites

Z index for sure not. Sticky header I think also no. I have to try tomorrow to narrow it down...

Share this post


Link to post
Share on other sites
On 9/27/2018 at 3:02 AM, bernhard said:

One thing I noticed is that when I reload the page after adding a folder to the ignored-list the Todo-Panel was not activated any more. I activated it via the checkbox in the panel selector and clicked "sticky". After saving the module's settings this setting was gone. Is this a bug? Or can I activate this panel in another way?

Just wanted to let you know, that this will no longer be a problem. I have removed the code that cleared the sticky panels cookie when saving the config settings. I'll keep an eye on things because I am still not sure exactly why I added it in the first place, but it's definitely annoying 🙂

 

On another note, core modules and site modules classes are now optional available in the API Explorer panel, along with lots of other improvements.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Hey @adrian ,

I'm just developing a new module and using your todo-panel all the time. Now I had the plan to place some files in /site/assets and some in /site/templates, both having the folder name MyModule.

The "problem" is that I want the files in /site/templates indexed by the todo-panel, but not the files in /site/assets (that's an external library).

Is there any chance to make the filter more specific? Maybe a regex option? No problem at all if that is not easily possible, but if it is, I'd be thankful for such a feature 🙂 

Share this post


Link to post
Share on other sites
44 minutes ago, bernhard said:

Hey @adrian ,

I'm just developing a new module and using your todo-panel all the time. Now I had the plan to place some files in /site/assets and some in /site/templates, both having the folder name MyModule.

The "problem" is that I want the files in /site/templates indexed by the todo-panel, but not the files in /site/assets (that's an external library).

Is there any chance to make the filter more specific? Maybe a regex option? No problem at all if that is not easily possible, but if it is, I'd be thankful for such a feature 🙂 

I agree the current approach isn't great, but is it possible to simply add "/site/assets/MyModule" to the ignore list. Doesn't that achieve what you want?

If not, I'd certainly be happy for a regex approach.

  • Like 1

Share this post


Link to post
Share on other sites

Thx @adrian didn't know this was possible! Of course that's totally sufficient 🙂 

I guess I tried it with wrong directory separators because I'm on Windows... This does work now, but it might be better (possible?) to stick with one version of the slash?

site/modules\MyModule\src

 

  • Like 1

Share this post


Link to post
Share on other sites

New "Adminer" database GUI panel just added.

image.thumb.png.f6425cc60bdaf152b44f75527a4ad1f9.png.6b4315b8dfb634592e45d83b2921e858.png

A huge thanks to @Robin S for making me take another look at this long forgotten tool and for helping with many suggestions regarding the implementation in Tracy and debugging several issues.

There is one outstanding one on his local Windows dev setup that I can't reproduce at all and he also isn't seeing on a live server. He is getting session_start / headers already sent error. 

Could someone else on Windows (maybe @bernhard) take a look and let me know if you have the same problem as well.

Actually Robin - any chance you are running the SessionHandlerDB modules on that local setup?

The color scheme is configurable in the Tracy settings.

I have used this already on a live server to help debug something and it would have taken much longer to go find the cpanel credentials, and navigate my way to PHPMyAdmin. This logs you in automatically and is virtually instant.

I am away for the next 10 days so if you find any problems, they will most likely have to wait till I'm back.

Hope you find it useful!

  • Like 6
  • Thanks 1

Share this post


Link to post
Share on other sites

Quick note to let you know that it's also possible to run Adminer directly via: /processwire/setup/adminer/ which may be preferable if you have lots of work to do and want it open in a more "permanent" way. At the moment I set the page as hidden so it actually won't appear under the Setup menu - I can change this, or perhaps I can have a link from the Adminer Tracy panel to open it this way. Any thoughts on which would be best?

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By teppo
      This module tracks changes, additions, removals etc. of public (as in "not under admin") pages of your site. Like it's name says, it doesn't attempt to be a version control system or anything like that - just a log of what's happened.
      At the moment it's still a work in progress and will most likely be a victim of many ruthless this-won't-work-let's-try-that-instead cycles, but I believe I've nailed basic functionality well enough to post it here.. so, once again, I'll be happy to hear any comments you folks can provide
      https://modules.processwire.com/modules/process-changelog/
      https://github.com/teppokoivula/ProcessChangelog
      How does it work?
      Exactly like it's (sort of) predecessor, Process Changelog actually consists of two modules: Process Changelog and Process Changelog Hooks. Hooks module exists only to serve main module by hooking into various functions within Pages class, collecting data of performed operations, refining it and keeping up a log of events in it's own custom database table (process_changelog.) Visible part is managed by Process Changelog, which provides users a (relatively) pretty view of the contents of said log table.
      How do you use it?
      When installed this module adds new page called Changelog under Admin > Setup which provides you with a table view of collected data and basic filtering tools See attached screenshots to get a general idea about what that page should look like after a while.
      For detailed installation instructions etc. see README.md.
       


    • By Gadgetto
      Status update links (inside this thread) for SnipWire development will be always posted here:
      2019-08-08
      2019-06-15
      2019-06-02
      2019-05-25
      If you are interested, you can test the current state of development:
      https://github.com/gadgetto/SnipWire
      Please note that the software is not yet intended for use in a production system (alpha version).
      If you like, you can also submit feature requests and suggestions for improvement. I also accept pull requests.
      ---- INITIAL POST FROM 2019-05-25 ----
      I wanted to let you know that I am currently working on a new ProcessWire module that fully integrates the Snipcart Shopping Cart System into ProcessWire. (this is a customer project, so I had to postpone the development of my other module GroupMailer).
      The new module SnipWire offers full integration of the Snipcart Shopping Cart System into ProcessWire.
      Here are some highlights:
      simple setup with (optional) pre-installed templates, product fields, sample products (quasi a complete shop system to get started immediately) store dashboard with all data from the snipcart system (no change to the snipcart dashboard itself required) Integrated REST API for controlling and querying snipcart data webhooks to trigger events from Snipcart (new order, new customer, etc.) multi currency support self-defined/configurable tax rates etc. Development is already well advanced and I plan to release the module in the next 2-3 months.
      I'm not sure yet if this will be a "Pro" module or if it will be made available for free.
      I would be grateful for suggestions and hints!
      (please have a look at the screenshots to get an idea what I'm talking about)
       




    • By apeisa
      Update 31.7.2019: AdminBar is now maintained by @teppo. Modules directory entry has been updated, as well as the "grab the code" link below.
      ***
      Latest screencast: http://www.screencas...73-ab3ba1fea30c
      Grab the code: https://github.com/teppokoivula/AdminBar
      ***
      I put this Adminbar thingy (from here: http://processwire.c...topic,50.0.html) to modules section and to it's own topic.
      I recorded quick and messy screencast (really, my first screencast ever) to show what I have made so far. You can see it from here: http://www.screencas...18-1bc0d49841b4
      When the modal goes off, I click on the "dark side". I make it so fast on screencast, so it might seem a little bit confusing. Current way is, that you can edit, go back to see the site (without saving anything), continue editing and save. After that you still have the edit window, but if you click "dark side" after saving, then the whole page will be reloaded and you see new edits live.
      I am not sure if that is best way: there are some strengths in this thinking, but it is probably better that after saving there shouldn't be a possibility to continue editing. It might confuse because then if you make edits, click on dark side -> *page refresh* -> You lose your edits.
      ***
      When I get my "starting module" from Ryan, I will turn this into real module. Now I had to make some little tweaks to ProcessPageEdit.module (to keep modal after form submits). These probably won't hurt anything:
      if($this->redirectUrl) $this->session->redirect($this->redirectUrl); if(!empty($_GET['modal'])) $this->session->redirect("./?id={$this->page->id}&modal=true"); // NEW LINE else $this->session->redirect("./?id={$this->page->id}");   and...
      if(!empty($_GET['modal'])) { $form->attr('action', './?id=' . $this->id . '&modal=true'); } else { $form->attr('action', './?id=' . $this->id); // OLD LINE }  
    • By Mike Rockett
      Jumplinks for ProcessWire
      Release: 1.5.54
      Composer: rockett/jumplinks
      Jumplinks is an enhanced version of the original ProcessRedirects by Antti Peisa.
      The Process module manages your permanent and temporary redirects (we'll call these "jumplinks" from now on, unless in reference to redirects from another module), useful for when you're migrating over to ProcessWire from another system/platform. Each jumplink supports wildcards, shortening the time needed to create them.
      Unlike similar modules for other platforms, wildcards in Jumplinks are much easier to work with, as Regular Expressions are not fully exposed. Instead, parameters wrapped in curly braces are used - these are described in the documentation.
      Under Development: 2.0, to be powered by FastRoute
      As of version 1.5.0, Jumplinks requires at least ProcessWire 2.6.1 to run.
      View on GitLab
      Download via the Modules Directory
      Read the docs
      Features
      The most prominent features include:
      Basic jumplinks (from one fixed route to another) Parameter-based wildcards with "Smart" equivalents Mapping Collections (for converting ID-based routes to their named-equivalents without the need to create multiple jumplinks) Destination Selectors (for finding and redirecting to pages containing legacy location information) Timed Activation (activate and/or deactivate jumplinks at specific times) 404-Monitor (for creating jumplinks based on 404 hits) Additionally, the following features may come in handy:
      Stale jumplink management Legacy domain support for slow migrations An importer (from CSV or ProcessRedirects) Feedback & Feature Requests
      I’d love to know what you think of this module. Please provide some feedback on the module as a whole, or even regarding smaller things that make it whole. Also, please feel free to submit feature requests and their use-cases.
      Note: Features requested so far have been added to the to-do list, and will be added to 2.0, and not the current dev/master branches.
      Open Source

      Jumplinks is an open-source project, and is free to use. In fact, Jumplinks will always be open-source, and will always remain free to use. Forever. If you would like to support the development of Jumplinks, please consider making a small donation via PayPal.
      Enjoy! :)
×
×
  • Create New...