SamC Posted April 17, 2017 Share Posted April 17, 2017 Hi, I got round to installing the tracy debugger. Pretty lost with it tbh, looks like a huge variety of options. Anyway, just testing it out, but when I click on the console, there's nowhere to type: Looking at some screenshots, seems there should be a black box in there. Not sure what I'm doing wrong here. Brand new install 3.0.42 with Tracy 4.3.2, using google chrome. [SOLVED - SEE EDIT BELOW] One other thing, I wanted to test the 'bd()' method to see what's actually in the whole array. So I can't get the console working (as above) so I typed it straight in my template and I get some output in the dumps recorder. The array is bigger than what it output though so I can't see it all. I used it like this in the template: <?php $json = file_get_contents($config->paths->templates . "/file.json"); json_decode($json, $assoc = true); bd($json); ?> ...which outputs: I've been reading on this page: https://processwire.com/blog/posts/introducing-tracy-debugger/#dumps-recorder-panel but still not getting it right. Any advice would be great, thanks. ==EDIT== Solved the second bit by using: <?php $json = json_decode(file_get_contents($config->paths->templates . "/file.json"), $assoc = true); bd($json); ?> Still no console though. 1 Link to comment Share on other sites More sharing options...
adrian Posted April 17, 2017 Share Posted April 17, 2017 Just to clarify the bd($json) issue in case you didn't realize what is going on there. You could dump the entire json string if you wanted by using bdl() - which is a shortcut for barDumpLive(), or you could specify bd($json, 'JSON, array('maxLength' => 877) which would make the string length displayed match the length of the actual string. Note the defaults for maxLength and maxDepth are configurable in the module config setting, but these can dramatically slow down rendering, so generally recommended to leave as is and supply in the bd() statement when you need to override. Regarding the console panel - please open your browser console and let us know if you have any errors there - looks like the JS isn't being loaded. 1 Link to comment Share on other sites More sharing options...
SamC Posted April 17, 2017 Author Share Posted April 17, 2017 1 hour ago, adrian said: Just to clarify the bd($json) issue in case you didn't realize what is going on there. You could dump the entire json string if you wanted by using bdl() - which is a shortcut for barDumpLive(), or you could specify bd($json, 'JSON, array('maxLength' => 877) which would make the string length displayed match the length of the actual string. Note the defaults for maxLength and maxDepth are configurable in the module config setting, but these can dramatically slow down rendering, so generally recommended to leave as is and supply in the bd() statement when you need to override. Regarding the console panel - please open your browser console and let us know if you have any errors there - looks like the JS isn't being loaded. Thanks for the info. Yes to the second point, got a 404 in the console, can't find: /site/modules/TracyDebugger/ace-editor/ace.js Maybe because when I installed the module, after unzipping, my path is actually: /site/modules/TracyDebugger-master/ace-editor/ace.js Guess you have to rename the folder and remove the '-master' bit after unzipping. Link to comment Share on other sites More sharing options...
adrian Posted April 17, 2017 Share Posted April 17, 2017 The easiest way to install modules is to install by Class Name. That will ensure the directory name is correct. If a module isn't in the modules directory, you should use the URL (to the zip), or the Upload option. The old manual unzip and move to site/modules doesn't make any sense anymore. 2 Link to comment Share on other sites More sharing options...
SamC Posted April 17, 2017 Author Share Posted April 17, 2017 Will do that from now on, thanks for the tip. 1 Link to comment Share on other sites More sharing options...
adrian Posted April 17, 2017 Share Posted April 17, 2017 @SamC - definitely use those methods for installing, but as an FYI, your issue did remind me that I used a poor approach to setting the paths to those resources which I just improved in 4.3.3, so thanks for the report. 1 Link to comment Share on other sites More sharing options...
SamC Posted April 18, 2017 Author Share Posted April 18, 2017 17 hours ago, adrian said: @SamC - definitely use those methods for installing, but as an FYI, your issue did remind me that I used a poor approach to setting the paths to those resources which I just improved in 4.3.3, so thanks for the report. No problem, glad to (accidentally) help 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