How to attach the VSCode debugger to the Brave browser? How to attach the VSCode debugger to the Brave browser? google-chrome google-chrome

How to attach the VSCode debugger to the Brave browser?


For MacOS users

I was able to connect to create a configuration in launch.json so that the Brave browser launches on MacOS. I appended the "userData": true property because I was getting an error. I figured that out by looking at this page. https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome

{    "type": "chrome",    "request": "launch",    "name": "Brave",    "runtimeExecutable": "/Applications/Brave Browser.app/Contents/MacOS/Brave Browser",    "userDataDir": true,    "url": "http://localhost:8080",    "webRoot": "${workspaceFolder}"}


A little late but....get brave-dev following this

then add to your launch.json a "runtimeExecutable": "/usr/bin/brave" entry and change the path that suits you.

rest of the settings can be default


The DEV version of Brave is not necessary.

In your Brave browser, under "chrome://settings/privacy", enable the "Remote debugging" option.

Restart your browser.

If not done yet, add to your launch.json file this (adjust your path if it is not the same)

"runtimeExecutable": "C:\\Program Files (x86)\\BraveSoftware\\Brave-Browser\\Application\\brave.exe",