PBJS Debugger is a tool to debug pages with Prebid.js + Google Publisher Tag implemented.
Open the Chrome Dev Tools. In the Sources tab, next to Content Scripts, click the » button and you can add Snippets.
(async function () {
function importTag() {
const scriptEl = document.createElement("script");
scriptEl.src = "https://katsuo5.github.io/pbjs-debugger/index.min.js";
scriptEl.async = true;
document.getElementsByTagName("head")[0].appendChild(scriptEl);
}
async function waitForTimeout(milliseconds) {
return new Promise((r) => setTimeout(r, milliseconds));
}
googletag.openConsole();
await waitForTimeout(1000);
if (!window.pbjsDebugger) {
importTag();
} else {
window.pbjsDebugger.printSummary();
}
})();