![]() ![]() $ver Resolves to something like '104323' ie. I was working through Trailhead assignments that use console. If you are not remote debugging, consider it. If you are remote debugging check the console output of the browser. Solution: $timestamp = filemtime( plugin_dir_path( _FILE_ ). Console.log () statements dont show up in Logs area of Developer Console. I found that sometimes my console.log () would not appear in the terminal, but then I found that they could always be viewed through the Chrome developer tools during remote debugging. I think that the timestamp is too big and gets truncated? Whatever the timestamp was, the url of the js file '?ver=xxxxxxx' was identical.Ī simpler version parameter, however, DOES change the url and Chrome reloads every time the version parameter is changed. Try enabling them and then checking persist logs to remember that setting for each page load. If the console isn’t showing anything, it may be because the logs are disabled. ![]() Click on the gear in the top right corner. $ver = filemtime( plugin_dir_path( _FILE_ ). Ensure that Logs is highlighted in grey to make sure it’s enabled. I'm on a Wordpress platform so I tried using the js file timestamp as the version parameter in 'wp_enqueue_script()' as an attempt to cache-bust.Įg. Clearing the cache ( 'Ctrl-Shft-Del' on Chrome ) got it working. Open the console in Chrome Refresh app and nothing gets printed This should be printed in console should have been printed to Chrome console I think the issue may be related to the Chrome release since it was after an upgrade it stopped working. Depend on your purpose and your debugging stage, wisely choose the right component because some components may interfere the issue in some conditions. For production, tracking log for long time to view later, console.log shows a lot disadvantages. Chrome was not recognising updated script files. For hot debug, nothing is better than console.log. When I run even basic console.log nothing happens e.g: console. I didn't find a complete solution online, so I hope this helps someone.Īfter a bit of a journey I discover that it is a caching issue. There is no output on the terminal for console.log. I've had similar issues with javascript 'alert()' and 'console.log()' apparently not working in Chrome, but working in Firefox.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |