mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-01-22 22:28:14 -05:00
Added: debug options for vscode debug
This commit is contained in:
parent
16f518b2ad
commit
29fb9c742e
22
.vscode/launch.json
vendored
22
.vscode/launch.json
vendored
@ -4,14 +4,34 @@
|
|||||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Launch",
|
||||||
|
"type": "node",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceRoot}/src/main/index.dev.js",
|
||||||
|
"env": {
|
||||||
|
"DEBUG_ENV": "debug"
|
||||||
|
},
|
||||||
|
"stopOnEntry": false,
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceRoot}",
|
||||||
|
// this points to the electron task runner
|
||||||
|
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
|
||||||
|
"runtimeArgs": [
|
||||||
|
"--nolazy"
|
||||||
|
],
|
||||||
|
"sourceMaps": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "Attach",
|
"name": "Attach",
|
||||||
"type": "node",
|
"type": "node",
|
||||||
"request": "attach",
|
"request": "attach",
|
||||||
"port": 5858,
|
"port": 5858,
|
||||||
"sourceMaps": false,
|
"sourceMaps": true,
|
||||||
|
"restart": true,
|
||||||
"outFiles": [],
|
"outFiles": [],
|
||||||
"localRoot": "${workspaceRoot}",
|
"localRoot": "${workspaceRoot}",
|
||||||
|
"protocol": "inspector",
|
||||||
"remoteRoot": null
|
"remoteRoot": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "./dist/electron/main.js",
|
"main": "./dist/electron/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"render": "webpack-dev-server --hot --colors --config .electron-vue/webpack.renderer.config.js --port 9080 --content-base app/dist",
|
||||||
"build": "node .electron-vue/build.js && electron-builder",
|
"build": "node .electron-vue/build.js && electron-builder",
|
||||||
"release": "node .electron-vue/build.js && electron-builder",
|
"release": "node .electron-vue/build.js && electron-builder",
|
||||||
"build:dir": "node .electron-vue/build.js && electron-builder --dir",
|
"build:dir": "node .electron-vue/build.js && electron-builder --dir",
|
||||||
|
@ -24,4 +24,15 @@ require('electron').app.on('ready', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Require `main` process to boot app
|
// Require `main` process to boot app
|
||||||
|
if (process.env.DEBUG_ENV === 'debug') {
|
||||||
|
require('babel-core/register')({
|
||||||
|
'presets': [
|
||||||
|
['env', {
|
||||||
|
'targets': {
|
||||||
|
'node': true
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
]
|
||||||
|
})
|
||||||
|
}
|
||||||
require('./index')
|
require('./index')
|
||||||
|
@ -13,6 +13,9 @@ import pkg from '../../package.json'
|
|||||||
if (process.env.NODE_ENV !== 'development') {
|
if (process.env.NODE_ENV !== 'development') {
|
||||||
global.__static = require('path').join(__dirname, '/static').replace(/\\/g, '\\\\')
|
global.__static = require('path').join(__dirname, '/static').replace(/\\/g, '\\\\')
|
||||||
}
|
}
|
||||||
|
if (process.env.DEBUG_ENV === 'debug') {
|
||||||
|
global.__static = require('path').join(__dirname, '../../static').replace(/\\/g, '\\\\')
|
||||||
|
}
|
||||||
|
|
||||||
let window
|
let window
|
||||||
let settingWindow
|
let settingWindow
|
||||||
@ -50,6 +53,7 @@ function createTray () {
|
|||||||
{
|
{
|
||||||
label: '打开详细窗口',
|
label: '打开详细窗口',
|
||||||
click () {
|
click () {
|
||||||
|
console.log(1)
|
||||||
if (settingWindow === null) {
|
if (settingWindow === null) {
|
||||||
createSettingWindow()
|
createSettingWindow()
|
||||||
settingWindow.show()
|
settingWindow.show()
|
||||||
|
Loading…
Reference in New Issue
Block a user