Debug Web3 React Application using VScode

Viewed 117

I am using VSC:

Version: 1.65.2
Commit: c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1
Date: 2022-03-10T15:36:26.048Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Linux x64 5.13.0-35-generic snap

I want to debug my react application that uses web3 to connect to ethereum blockchain.

I created the following launch.json:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "type": "pwa-chrome",
            "request": "launch",
            "name": "Debug React    ",
            "url": "http://localhost:3000",
            "webRoot": "${workspaceFolder}"
        }
    ]
}

When I start my application with npm run start it runs correctly in my chrome browser, where metamask is installed.

However, when pressing the debug launch config a new emtpy chrome window starts, that has no metamask tooling installed, like the following:

enter image description here

Any suggestions how to start my installed chrome browser?

I appreciate your replies!

0 Answers
Related