What do you mean by audit log? If you are refering to the standard audit log for QlikView it would work together with extensions if you want to log what kind of data is available to the extension. Be aware that with that level of details in the audit log it might affect performance.
If you want to debug the code in the actual extension normal debugging conventions apply.
Either use the console object to log debugging information to the browser, see https://developer.mozilla.org/en-US/docs/DOM/console.log
Or go old school and use alert methods to log progress in your script.