Debug Chrome extension sidebar panel

I am developing a Chrome extension that adds SidebarPanel . I add it to devtools.js:

chrome.devtools.panels.elements.createSidebarPane(
    "Guardian",
    function (sidebar) {
        sidebar.setPage('extension/sidebar.html')
    });

sidebar.html includes the required JS - sidebar.js.

<html>
<head>
    <script src="sidebar.js"></script>
</head>
...
<body style="min-height: 200px">
...
</html>

Problem: In Debtools debug views, I do not see the sidebar.js file anywhere, so I cannot debug it. Following the method given here , I can recreate background.js and devtools.js - but not sidebar.js.

+4
source share

Source: https://habr.com/ru/post/1619932/


All Articles