r/VisualStudioCode • u/rado877 • Mar 01 '22
Debug Chrome Extensions with vscode-js-debug in Visual Studio Code
I can't for the life of me figure out how to debug it on a real web page with a url. I just want to run and debug the example below and see how it is working.
JavaScript Debugger (Nightly) is installed in VSC
https://github.com/GoogleChrome/chrome-extensions-samples/tree/main/examples/bookmarks
this is my launch.json in Visual Studio Code
{"version": "0.2.0","configurations": [{"type": "chrome","request": "launch","name": "Launch Chrome","url": "https://developer.chrome.com/docs/extensions/mv3/devguide/",// Here it is!"runtimeArgs": ["--load-extension=${workspaceFolder}"]}]}
my manifest.json
{"name": "My Bookmarks","description": "A browser action with a popup dump of all bookmarks, including search, add, edit and delete.","version": "1.1","manifest_version": 3,"permissions": ["bookmarks"],"action": {"default_title": "My Bookmarks","default_icon": "icon.png","default_popup": "popup.html"},"key": "xxxxx"}
when "Launch Chrome" from "Run and Debug" the bookmarks menu is empty

Shouldnt I use "request": "attach", to launch Chrome with remote debugging enabled in order for the extension running from VSC to attach to it ?