'How can I use devtools in a chrome extension with manifest v3?

Basically, I have a chrome extension that I want to be able to use the chrome devtools api. However, when I try to load the extension with devtools specified in the manifest's permissions, I get this error:

Permission 'devtools' cannot be specified in the manifest. Could not load manifest.

I've also tried moving it into optional_permissions, but that still produces the same result.

Sorry if this is a stupid question, i'm new to this.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source