Search code examples
moodleamd

debugging amd js codes in moodle whithout purge caches


When I want to debug javascript codes in AMD module in moodle its too hard to purge all site caches in each edit is there any way for debugging? on the other hand when I purge all caches it takes much time to load again. I tried enabling theme developer mode but my problem not solved.


Solution

  • Go to

    Site administration ► Appearance ► AJAX and Javascript
    

    Turn off "Cache Javascript" and save. This will make the system not compress and cache the javascript so your changes will take effect right away. This also means that only changes you make in the amd/src will be shown. You should generate the amd/build javascript using grunt once you are ready to go to production and turn the cache back on.