How to debug memory leaks when creating an addon?

I made an addon and published it, but it’s become clear that there is a significant memory leak related to the background.js.
Searching online only seems to come up with ways to debug websites but when I try to debug my addon there is no performance or memory tab for the background.js how should I start to tackle this problem? btw I am not too experienced so any guidance would be greatly appreciated.