diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..0ca806f6 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,36 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Electron: Main", + "type": "node", + "request": "launch", + "protocol": "inspector", + "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron", + "windows": { + "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd" + }, + "preLaunchTask": "electron-debug", + "args": ["--remote-debugging-port=9223", "./dist_electron"], + "outFiles": ["${workspaceFolder}/dist_electron/**/*.js"] + }, + { + "name": "Electron: Renderer", + "type": "chrome", + "request": "attach", + "port": 9223, + "urlFilter": "http://localhost:*", + "timeout": 30000, + "webRoot": "${workspaceFolder}/src", + "sourceMapPathOverrides": { + "webpack:///./src/*": "${webRoot}/*" + } + } + ], + "compounds": [ + { + "name": "Electron: All", + "configurations": ["Electron: Main", "Electron: Renderer"] + } + ] + } \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 93949c85..e741537f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -18,7 +18,7 @@ } ], "typescript.updateImportsOnFileMove.enabled": "always", - "editor.fontFamily": "Monaco", + // "editor.fontFamily": "Monaco", "editor.codeActionsOnSave": { "source.fixAll.eslint": true } diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000..469c0dd7 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,27 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "electron-debug", + "type": "process", + "command": "./node_modules/.bin/vue-cli-service", + "windows": { + "command": "./node_modules/.bin/vue-cli-service.cmd" + }, + "isBackground": true, + "args": ["electron:serve", "--debug"], + "problemMatcher": { + "owner": "custom", + "pattern": { + "regexp": "" + }, + "background": { + "beginsPattern": "Starting development server\\.\\.\\.", + "endsPattern": "Not launching electron as debug argument was passed\\." + } + } + } + ] + } \ No newline at end of file diff --git a/vue.config.js b/vue.config.js index de869abf..0722733c 100644 --- a/vue.config.js +++ b/vue.config.js @@ -71,5 +71,8 @@ module.exports = { // 这一步还蛮重要的,不然就会报错 nodeModulesPath: ["./node_modules"] } + }, + configureWebpack: { + devtool: 'source-map' } };