Hi, many thanks for your help!
Finally I found my way to debug my service worker.
There is subtle differences between your solution and mine.
I guess the reason is we have different chrome versions installed separately.
The following is my solution to the problem:
1. Open URL specific for your extension like:
chrome-extension://[extension-id]/manifest.json or chrome-extension:// [extension-id]/background.js
2. If js file is not listed under Sources panel, like this:
go to Application panel and click start
now go back to Sources panel and your js file will be available now.
3. Set breakpoint(s) on the left of the source code
go back to Application panel and click stop then start:
4. You can adjust your code and update your code by click update:
It is likely that you will rerun your original source code but don't worry.
You will see a hint below in the Application panel like this:
I don't know why new source code is not updated and still waiting. Hopefully you can provide some hints about this behavior.
Then just click skipWaiting and you will see your updated code and a new number.
Just click stop then start:
Alright. Just repeat these steps and tweak your code. Happy coding.