if we have a html and JavaScript code beside it and there is undefined variable in my JavaScript I can see error in Firefox development tool(F12). now i developing an extension but i can't see error any where.
I read in this link about Setting up an extension development environment but that isn't help me.
i see similar questions in stackoverflow but they didn't help me.
<html>
<p id='p1' onclick='add()'>1</p>
<script>
function add(){
p1 = document.getElementById('p1')
p1.innerText++
}
observer = new MutationObserver(function(mutations){
console.log(mutations)
});
observer.observe(p1,{
childList :true
});
</script>
</html>
in this case if i wrote p2 instead of p1 i see in DevTools Console something like : Uncaught RefrenceError...
but if i use under javascript code as extension i can't debug or see errors
p1 = document.getElementById('p1')
observer = new MutationObserver(function(mutations){
console.log(mutations)
});
observer.observe(p1,{
childList :true
});
my goal for extension is track changes in a page an log them. but i can't see errors in DevTool Console for my extension.
EDIT: the problem is when i load my extension, debugger in empty.(i can't see my js files)
why?