adambullmer / vue-cli-plugin-browser-extension

Browser extension development plugin for vue-cli 3.0
GNU Lesser General Public License v3.0
427 stars 76 forks source link

How to debug in the web browser? #98

Open naivenaive opened 4 years ago

naivenaive commented 4 years ago

I am using the vue-cli-plugin-browser-extension version 0.24.2. It works fine with npm run serve. But when I want to debug in the web browser, I can only find the modified background.js which is edited by the webpack. I can't find the origin code. I added the following code in the vue.config.js as suggested in https://vuejs.org/v2/cookbook/debugging-in-vscode.html . But it never works. How can I get the origin code and debug in the web browser?

configureWebpack: {
    devtool: "source-map"
  }
mornir commented 4 years ago

Are you trying to debug the popup? In Chrome, you need right click inside the popup and select "inspect". In Firefox, you need to click the inspect button on the screen where you added your extension as a temporary extensions.