matjazp Posted March 9, 2016 Share Posted March 9, 2016 Thanks @adrian, it's working. 1 Link to comment Share on other sites More sharing options...
tpr Posted March 9, 2016 Share Posted March 9, 2016 insert debugging statements Interesting feature though not sure if I would ever use it. Btw, having no access to the remote files, how would you know the line numbers? (and without being a PHP guru ) 1 Link to comment Share on other sites More sharing options...
adrian Posted March 9, 2016 Author Share Posted March 9, 2016 Interesting feature though not sure if I would ever use it. Btw, having no access to the remote files, how would you know the line numbers? (and without being a PHP guru ) You'd know the line numbers from any error messages that Tracy has reported. You can of course always enter line #1 for some scenarios. Maybe it would be nice if I had a trigger for inserting at the last line as well? But, agreed it is probably a little obscure as a feature - I'll see how much I end up using it and see if others find a use for it. 2 Link to comment Share on other sites More sharing options...
lpa Posted March 11, 2016 Share Posted March 11, 2016 The Editor Protocol Handler would be great, but I have problems with escaped characters like / as %2F. The links look like this: openineclipse://open?url=file://%2FLibrary%2FWebServer%2FDocuments%2Fpw25%2Fsite%2Ftemplates%2Fhome.php&line=25 But in Safari at least this doesn't work if I don't change each "%2F" to "/". How could I change the links to be like: openineclipse://open?url=file:///Library/WebServer/Documents/pw25/site/templates/home.php&line=25 or get Safari or Chrome understand I found help on defining the Editor Protocol Handler for Eclipse "openineclipse" on this page: http://teleyag.com/blog/2011/08/19/openineclipse-url-scheme-for-mac/ I managed to fix this problem and now I have the Editor Protocol Handler working with Eclipse. Here comes what I did: I followed the document here: http://teleyag.com/blog/2011/08/19/openineclipse-url-scheme-for-mac/. The only change was to fix that urlencoding problem above with the following AppleScript change. On line 6 I added: set this_URL to replace_chars(this_URL, "%2F", "/") And in the end of the script this function for replace_chars: on replace_chars(this_text, search_string, replacement_string) set AppleScript's text item delimiters to the search_string set the item_list to every text item of this_text set AppleScript's text item delimiters to the replacement_string set this_text to the item_list as string set AppleScript's text item delimiters to "" return this_text end replace_chars 2 Link to comment Share on other sites More sharing options...
tpr Posted March 24, 2016 Share Posted March 24, 2016 I got an issue with ajax submitting forms & Tracy. The module is always adding itself to the page, though my intention is to have a json_encoded string as the only response. Now I got this: "Thank you for contacting us!" (.. tracy code here ...) The reason could be that $config->ajax validates to false because I'm using pure JS instead of jQuery. With jQuery there's no Tracy code appearing. So unfortunately using $config->ajax to decide ajax mode wouldn't help here. Link to comment Share on other sites More sharing options...
LostKobrakai Posted March 24, 2016 Share Posted March 24, 2016 Add a "X-Requested-With: XMLHttpRequest" header to the ajax call and $config->ajax will work. 3 Link to comment Share on other sites More sharing options...
tpr Posted March 24, 2016 Share Posted March 24, 2016 Thanks, that solved it. I remember seeing that header in the jQuery request but haven't try adding manually. That's the corresponding part if anyone needs: request.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); 2 Link to comment Share on other sites More sharing options...
adrian Posted March 24, 2016 Author Share Posted March 24, 2016 Thanks for the report @tpr and for the solution @LostKobrakai. Sorry, I am on the road at the moment (mostly vacation) and so my response time could be several days. It sounds like you have everything working as needed at the moment, but let me know if you think that perhaps Tracy needs to handle this better. Not the same thing I know, but the latest version of Tracy (the core project) now provides details on ajax requests - might be coming soon to this module, but there is a PHP 5.4.4 requirement, so might have to wait until PW drops 5.3 support. 2 Link to comment Share on other sites More sharing options...
szabesz Posted March 25, 2016 Share Posted March 25, 2016 ...but there is a PHP 5.4.4 requirement, so might have to wait until PW drops 5.3 support. Isn't it possible to bundle two versions of Tracy and use the one appropriate? Too much work maybe? 1 Link to comment Share on other sites More sharing options...
adrian Posted March 25, 2016 Author Share Posted March 25, 2016 Isn't it possible to bundle two versions of Tracy and use the one appropriate? Too much work maybe? Might be an option. I'll have a play with the new ajax stuff in the latest version of Tracy and see if it's worth it. 1 Link to comment Share on other sites More sharing options...
adrian Posted March 25, 2016 Author Share Posted March 25, 2016 The latest PW blog post is all about TracyDebugger: https://processwire.com/blog/posts/introducing-tracy-debugger/ Hope you guys find some new info and tips in there - sorry, it's a pretty long read 4 Link to comment Share on other sites More sharing options...
netcarver Posted March 25, 2016 Share Posted March 25, 2016 Adrian, Many thanks for this debugger. It. Is. Fantastic! Could I request the xdebug integration, please. 1 Link to comment Share on other sites More sharing options...
szabesz Posted March 25, 2016 Share Posted March 25, 2016 I should have thought that you are also working while traveling Thanks again for one of the most useful modules and for the blog post as well! 2 Link to comment Share on other sites More sharing options...
adrian Posted March 25, 2016 Author Share Posted March 25, 2016 Adrian, Many thanks for this debugger. It. Is. Fantastic! Could I request the xdebug integration, please. Thanks for the kudos - and yes, I will look into adding that Xdebug helper module (https://componette.com/jsmitka/nette-xdebug-helper/). There is actually another one that I didn't mention in the post: https://componette.com/milo/xdebugtracepanel/ which is for showing Xdebug traces in a Tracy panel - it is currently abandoned, but the author says he is working on a new version, but not sure on the status of that. I should have thought that you are also working while traveling Thanks again for one of the most useful modules and for the blog post as well! I shouldn't be, and I am not really - I was just silly enough to check my email the other day and saw a request from Ryan for a blog post. I am actually away on an extended trip, so I don' really mind 1 Link to comment Share on other sites More sharing options...
adrian Posted March 26, 2016 Author Share Posted March 26, 2016 Hi everyone, New version just committed. It comes packaged with both stable (2.3.10 - what it was using before) and master (2.4 dev) versions of Tracy. If you have PHP 5.4.4+ it will use the master/dev version which among other improvements, adds support for monitoring of, and allowing dumping from, AJAX calls. One quick way to see the AJAX monitoring in effect is to check "Backend" under the "Show Debug Bar" config option. Then hover over the PW menu in the admin to one of the AJAX-driven submenus - notice the new row in the debug bar showing the time etc for the AJAX request. You'll also see this popup when clicking on the Children tab when editing a page, and several other places throughout the PW admin. Of course this will also work for any AJAX requests on the front-end of you site. Here's a screenshot showing both rows (normal and ajax) with the Dumps panels for both. I have two bd() calls - one "classic" and one via "ajax". Please let me know if you notice any issues with this new version. 5 Link to comment Share on other sites More sharing options...
adrianmak Posted March 30, 2016 Share Posted March 30, 2016 I downloaded the module and enabled. But there is no tracy debugger bar shown on the front-end Link to comment Share on other sites More sharing options...
tpr Posted March 30, 2016 Share Posted March 30, 2016 Try setting Mode to DEVELOPMENT or check Superuser force dev mode. 3 Link to comment Share on other sites More sharing options...
adrianmak Posted March 30, 2016 Share Posted March 30, 2016 It shown up now, by setting to development mode instead of detect mode 1 Link to comment Share on other sites More sharing options...
Martijn Geerts Posted March 30, 2016 Share Posted March 30, 2016 Tracy is FANTASTIC, thanks Adrian ! 4 Link to comment Share on other sites More sharing options...
szabesz Posted March 30, 2016 Share Posted March 30, 2016 It shown up now, by setting to development mode instead of detect mode Is it possible that you are using it on a live site or at least a publicly accessible server and not your local machine? 2 Link to comment Share on other sites More sharing options...
bernhard Posted April 8, 2016 Share Posted April 8, 2016 hi adrian, what do you think about integrating a w3 validator into the tracy bar? i was thinking about implementing this as a little module, but i think it would even be better to have this as an option built into tracy. or is it a gain a feature that's already covered anywhere? 5 Link to comment Share on other sites More sharing options...
tpr Posted April 8, 2016 Share Posted April 8, 2016 Browser extensions? I'm not sure if this feature is worth a (sub)module, unless it provides some benefits over them. 2 Link to comment Share on other sites More sharing options...
bernhard Posted April 8, 2016 Share Posted April 8, 2016 Of course... I don't use lots of them so I didn't think of that Link to comment Share on other sites More sharing options...
adrian Posted April 8, 2016 Author Share Posted April 8, 2016 Hey @bernhard - thanks for the suggestion, but I think I agree with @tpr here - this might be better handled buy a browser extension. It's funny really I used to be obsessed with having perfectly validating pages, but then it seemed that for a while there (as HTML5 was becoming more usable) that validators weren't keeping up so I stopped using one. Now the only time I use one is for validation of XML. That said, if others think that it would be a useful addition to Tracy, I'd be willing - after-all, if you don't want to use it, just disable the panel and nothing will be loaded. Anyone else have any thoughts on this? Link to comment Share on other sites More sharing options...
szabesz Posted April 9, 2016 Share Posted April 9, 2016 Although in the case of real projects I find it nearly impossible to produce HTML output that is considered to be valid by the W3 validator, I think it is a good idea to have a quick look so that anything considered to be a bug (say not closed elements) can be quickly identified. So I support the idea. 5 Link to comment Share on other sites More sharing options...
Recommended Posts