When I open my web application in the Chrome
browser I can attach the VSCode
debugger to it.
The debugger configuration is:
{ "name": "Attach to Chrome", "type": "chrome", "request": "attach", "port": 9222, "url": "http://localhost:4200/*", "webRoot": "${workspaceFolder}", },
But when I open the web application in the Brave browser I cannot attach the VSCode
debugger.
The web application is an Angular
one opened at http://localhost:4200/users
I'm running:
Chrome Version 70.0.3538.102 (Build officiel) (64 bits) Brave Version 0.56.12 Chromium: 70.0.3538.77 (Build officiel) (64 bits) VSCode Version 1.23.0
on a Lubuntu 16.04
box.
Is the Brave
browser not yet ready for debugging ? Or is there some port restriction I should remove ? I have put the shiled down for this web application. But VSCode
still does not attach to it.
Debugging Content You can open the loaded content dev tools using Command+Alt+I on macOS or Control+Alt+I on Windows. If you'd like to see code run on each page load, you can edit app/extensions/brave/brave-default.
Remote debugging can now be enabled via brave://settings/privacy … This commit was signed with the committer's verified signature. Learn about vigilant mode. Remote debugging can now be enabled via brave://settings/privacy …
To debug any project in either Chrome or Microsoft Edge, all you need to do is to start a session by pressing F5 or activating the debug icon in the menu bar and selecting “Run and debug”. Alternatively, you can also use the Visual Studio Code command palette and run the “Debug: Open Link” command.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With