adrian

Tracy Debugger

Recommended Posts

Thanks for the penflip suggestion. I am hesitant to host the docs somewhere else though.

I am actually tempted to just use the README.md file and make use of a Table of Contents to make it easier to navigate. In some ways this is better than the pagination options in the wiki and in some ways worse.

I am also looking at the possibility of using Github pages, but that means a "docs" subfolder (which would be included in module installs), or a separate "pages" repo. Doesn't seem like there is anything really ideal, although maybe having offline docs with a module would be an advantage despite the larger download. Maybe the PW modules interface could actually read and display the contents of the docs folder? That could actually be really cool - offline docs available directly from within PW. Anyone interested in supporting a request for this from Ryan? Or maybe it could be built initially as a module. Of course it would only be useful if module authors were to get on board, so it might take some time before it was actually useful.

 

Thanks @bernhard and @szabesz for the donation button push. There are so many people here who do lots for the PW community, I never wanted to put pressure on anyone for donations. Also not sure how effective it will really be. If the plan is to do less client work and more PW modules, then I think you need a more robust/reliable source of income that might come from a killer paid module, or a module with a free and pro version. Obviously getting way OT here though.

 

  • Like 1

Share this post


Link to post
Share on other sites

I'm not a fan of docs as part of modules. Maybe its just me but I like to keep the codebase as light as possible. Also, we've been asking for "changelog" support in ProcessWire so it is hard to see why docs support would get priority but one never knows :) 

11 minutes ago, adrian said:

I am hesitant to host the docs somewhere else though.

I understand this but if that tool can export in a format which makes it possible to migrate the whole stuff – just in case – then why not give it a try? I'm not pushing penflip.com as I have only read its homepage, I just like tools which are designed for a specific need. As long as they work well, of course...

  • Like 1

Share this post


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

I never wanted to put pressure on anyone for donations

i think most of us can handle this pressure :D of course it will not pay back the time invested but it's nice to have the possibility to say thank you. but of course if someone wants to invest more time on a module making it commercial is totally fine. i'm also thinking about that topic...

regarding the docs i would love to see some kind of standardisation here. maybe someone knows a good solution already.

  • Like 1

Share this post


Link to post
Share on other sites
30 minutes ago, szabesz said:

I'm not a fan of docs as part of modules. Maybe its just me but I like to keep the codebase as light as possible.

Well if there is no support by PW for reading and displaying the content in the /docs folder, it can easily be excluded from downloads using .gitattributes in the repo:

docs export-ignore

will ensure it is not downloaded when you install the module.

This way I could have a dedicated docs pages for Tracy hosted on Github Pages and you guys could submit PRs to help (which would be hugely appreciated). I'd love to see lots of screenshots and examples - this could work out really nicely I think. To that end, I have set up a new docs page at: https://adrianbj.github.io/TracyDebugger/

I have checked and the docs folder is correctly excluded from the download, so I think we should be good to go to start working on these docs. I have set the theme to the default "Cayman" for now, but may change as I learn more about Github Pages.

I'll set up a basic structure and then hope to see some pull requests from you guys. Does that look / sound ok?

  • Like 2

Share this post


Link to post
Share on other sites

Hi @adrian,

What do you think about adding a way to label dumps in the console, similar to what is possible with barDump?

So you could do:

d($foo, 'Foo');
d($bar, 'Bar');

This would help to identify which dump is which.

  • Like 1

Share this post


Link to post
Share on other sites

Hey @Robin S - how's this?

The only thing I am concerned about is the lack of delineation between "2" and the untitled "3", but the Dumps panel with bd() calls has the same problem which is a Tracy core thing anyway. I think this is probably ok - if you feel the need to title dumps, then you'll probably title them all.

The other frustration (which also affects the Dumps panel), is the need for specifying a title if you need to adjust the maxDepth or maxLength setting because of the order of the function arguments. I have thought about maybe checking if the second argument is an array, then assume it's the maxDepth/maxLength etc options, and not intended to be the title. This approach always feels hacky to me though - any thoughts?

5a0a34d93ca62_ScreenShot2017-11-13at4_11_04PM.png.763d8c28ab0659b4bf567463c7525f68.png

Share this post


Link to post
Share on other sites

Or maybe this is a little nicer?

This looks more like the output of the Dumps panel - there really is no point to that blue background in the entire results div.

5a0a37c164947_ScreenShot2017-11-13at4_23_52PM.png.34fa978ae54ed87c55f94790ae81c883.png

  • Like 1

Share this post


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

Or maybe this is a little nicer?

Maybe remove the space between the label and the dump output?

5a0a37c164947_ScreenShot2017-11-13at4_23_52PM_edit.png.158e56fae704a35cc26e8953d5cf6789.png

1 hour ago, adrian said:

I have thought about maybe checking if the second argument is an array, then assume it's the maxDepth/maxLength etc options, and not intended to be the title. This approach always feels hacky to me though - any thoughts?

Ryan does that sort of thing all through the core so I figure it's not too hacky. :-)

  • Like 1

Share this post


Link to post
Share on other sites

@Robin S - I've been playing a little more with this. I decided to do the check to see if the second parameter is an array or not. It still feels hacky, but I do like not having to add a title when I just want to adjust maxDepth/maxLength, so I think it's worth it.

I also tried removing the space between the label and the dump output (which I just got your reply about right now :)) and I think that works nicely.

What do you think - does this look ready to go?

BTW, I have also made both these changes to the Dumps panel.

5a0a46783030f_ScreenShot2017-11-13at5_26_37PM.png.c53d7853cb7e8dd3521847e2d53c4f3d.png

  • Like 2

Share this post


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

It still feels hacky, but I do like not having to add a title when I just want to adjust maxDepth/maxLength, so I think it's worth it.

Could you just pass null as the title argument in that case? Or is that just as much hassle?

38 minutes ago, adrian said:

What do you think - does this look ready to go?

Looks great to me.

  • Like 1

Share this post


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

Could you just pass null as the title argument in that case? Or is that just as much hassle?

Yeah, you could pass null, but I do think it's just as much hassle, so went with the "hack". I know it's used in the PW core and l've seen it lots of other places and used it myself - it just feels dirty, but in this case, I don't think it will get out of hand and makes it much simpler to use. 

  • Like 2

Share this post


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

I have committed a new version with these changes

Thanks for the speedy implementation!

  • Like 1

Share this post


Link to post
Share on other sites
On 11/14/2017 at 6:01 AM, bernhard said:

@adrian just wanted to make sure you didn't miss my quick note ;)

Sorry, @bernhard - yes I did see it. I haven't investigated fully yet. I am still not totally convinced of the right way to go - the Github Pages site is ready to go and can accept PRs, but @netcarver also has something cool up his sleeve:

 

Amongst its many features, makes the ReadMe file viewable from the Module settings within PW, so maybe that is actually a good place for docs after all?

tracy-003.thumb.png.5467e2bec05728934d1a68174201c261.png.54a33f28264cfa0e13866f8d6c49e0e2.png

So, not forgotten, just percolating. 

Thanks again for the suggestion!

  • Like 1

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 flydev
      PulsewayPush
      Send "push" from ProcessWire to Pulseway.
       
      Description
      PulsewayPush simply send a push to a Pulseway instance. If you are using this module, you probably installed Pulseway on your mobile device: you will receive notification on your mobile.
      To get more information about Pulseway, please visit their website.
      Note
      They have a free plan which include 10 notifications (push) each day.
       
      Usage
      Install the PulsewayPush module.
      Then call the module where you like in your module/template code :
      <?php $modules->get("PulsewayPush")->push("The title", "The notification message.", "elevated"); ?>  
      Hookable function
      ___push() ___notify() (the two function do the same thing)
       
      Download
      Github:  https://github.com/flydev-fr/PulsewayPush Modules Directory: https://modules.processwire.com/modules/pulseway-push/  
      Examples of use case
      I needed for our work a system which send notification to mobile device in case of a client request immediate support. Pulseway was choosen because it is already used to monitor our infrastructure.
      An idea, you could use the free plan to monitor your blog or website regarding the number of failed logins attempts (hooking Login/Register?), the automated tool then block the attacker's IP with firewall rules and send you a notification.
       

       
      - - - - - - - - - - - - - -
      11-22-2017: added the module to the modules directory
       
    • By netcarver
      Part 1 of a 2 part Module & Service Reveal.
      I'm currently working on a new module: ModuleReleaseNotes that was inspired by the work I originally did on making Ryan's ProcessWireUpgrades module "release" aware. In the end, I decided to ditch the approach I was originally taking and instead work on a module that hooked in to the UpgradeConfirmation dialog and the module edit page.
      Aims
      My aims for this module are as follows...
      Make discovery of a module's changes prior to an upgrade a trivial task. Make breaking changes very obvious. Make reading of a module's support documentation post-install a trivial task. Make module authors start to think about how they can improve the change discovery process for their modules. Make sure the display of information from the module support files/commit messages doesn't introduce a vulnerability. Looking at these in turn...
      Making discovery of a module's changes prior to upgrade a trivial task.
      This is done by adding a "What's changed section" to the upgrade confirmation dialog.  This section takes a best-effort approach to showing what's changed between the installed version and the updated version that's available via the module repository.
      At present, it is only able to talk to github-hosted repositories in order to ask them for the release notes, the changelog file (if present) and a list of commits between the git tag that matches the installed version and the tag matching the latest version.
      It will display the Release Notes (if the author is using the feature), else it will display the commits between the tags (if tagging is used by the module author) else it will show the changelog file (if present) else it will show the latest N commits on the master branch (N, of course, being configurable to your liking.)
      An example of the Github Release Notes pulled in for you, taken from Mike Rockett's TextformatterTypographer Module...

      An example of a tag-to-tag commit list from the same module...

      An example of a changelog - formatted to show just the changes (formatting styles will change)...

      Finally, an example of a fallback list of commits - sorry Adrian ...

       
      Making breaking changes obvious.
      This is currently done by searching for a set of configurable search strings. Later versions may be able to support breaking change detection via use of Semantic Versioning - but this may require some way of signalling the use of this versioning standard on a module-by-module basis.
      For now, then, you can customise the default set of change markers. Here I have added my own alias to the list of breaking change markers and the changes section of the changelog is styled accordingly (these will be improved)...

       
      Make reading of a module's support documentation, post-install, a trivial task.
      This is done by making some of the support files (like the README, CHANGELOG and LICENSE files) readable from the module's information/settings screen. There is an option to control the initial open/closed state of this section...

      Here is Tracy's README file from within the module settings page... 

       
      Make module authors start to think about how they can improve the change discovery process for their modules.
      There are notes in each of the sections displayed on the upgrade confirmation page that help authors use each of the features...

       
      Make sure display of external information doesn't introduce a vulnerability.
      This is an ongoing concern, and is the thing that is most likely to delay or prevent this module's release lead to this module's withdrawl should a vulnerability be found. Currently, output is formatted either via Markdown + HTML Purifier (if it was originally a Markdown file) or via htmlspecialchars() if it has come from a plaintext file.
      If you discover a vulnerability, please get in contact with me via the forum PM system.
       
      Ongoing...
      For now, I've concentrated on integration with GitHub, as most people use that platform to host their code. I know a few people are hosting their repositories with BitBucket (PWFoo comes to mind) and some with GitLab (Mike Rockett?) and I would eventually like to have adaptor implementations for these providers (and perhaps GitKraken) - but for now, GitHub rules and the other hosts are unsupported.
       
      Links
      Github: ModuleReleaseNotes
      PW Module Repository: Here
    • By FrancisChung
      Hi,
      I was wondering if anyone knew what this did? 

      If so, do you know what modules it actually impacts? Is there another log that lists the action it took?

      I'm having some weird problems with PHP duplicate declaration per link below, since this module was run.
       
       
    • By tpr
      AdminOnSteroids
      Various admin tweaks to enhance ProcessWire admin.
      http://modules.processwire.com/modules/admin-on-steroids/
      https://github.com/rolandtoth/AdminOnSteroids