0

I used create-react-app to create new react application. I have not changed absolutely anything except for adding configuration "Chrome-launch" into launch.json. After debug launching it always requires some authorization. According to chrome.debugger documentation I added to manifest.json this:

"permissions": [ "debugger"]

But it did not help. Now I have no idea how to get through it. Please, could someone give me a hint how to launch chrome-debugger without any authorization? I have used this debugger many times in the past and it never required authorization, I have no idea what has changed.

Behaviour in the browser: enter image description here launch.json:

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "chrome",
      "request": "launch",
      "name": "Launch Chrome against localhost",
      "url": "http://localhost:8080",
      "webRoot": "${workspaceFolder}"
    }
  ]
}

manifest.json:

{
  "short_name": "React App",
  "name": "Create React App Sample",
  "permissions": [
    "debugger"
  ],
  "icons": [
    {
      "src": "favicon.ico",
      "sizes": "64x64 32x32 24x24 16x16",
      "type": "image/x-icon"
    },
    {
      "src": "logo192.png",
      "type": "image/png",
      "sizes": "192x192"
    },
    {
      "src": "logo512.png",
      "type": "image/png",
      "sizes": "512x512"
    }
  ],
  "start_url": ".",
  "display": "standalone",
  "theme_color": "#000000",
  "background_color": "#ffffff"
}

package.json:

{
  "name": "kinosal",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "react": "^16.9.0",
    "react-dom": "^16.9.0",
    "react-scripts": "3.1.1"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}
user8620575
  • 165
  • 2
  • 9
  • Is that manifest for PWA or are you building extension? Both use manifest.json but they are different. Because, permissions is part of Browser Extension's manifest.json. I'm not sure it is available in Web App manifest. Is it working without permissions key? – Sai Sandeep Vaddi Sep 03 '19 at 22:43
  • I just forgot that debugging cannot work on different port than where the app is running in the browser. When i changed port in url on 3000, it started working. My mistake. Sorry – user8620575 Sep 03 '19 at 22:51

0 Answers0