This is an opinionated guide to developing WebExtensions. It isn’t the right way to do things, but it is a way. Hope it helps.
- Install Visual Studio Code (VSC).
- Install VSC extension: Debugger for Chrome.
- Create a new folder and open in VSC.
- Create a debug configuration (launch.json).
- For Chrome, see this StackOverflow thread.