Skip to content

Commit 07aa775

Browse files
committed
Add vscode debug support
1 parent d0c5592 commit 07aa775

File tree

4 files changed

+78
-2
lines changed

4 files changed

+78
-2
lines changed

.vscode/launch.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
8+
{
9+
"type": "node",
10+
"request": "launch",
11+
"name": "BoostNote Main",
12+
"protocol": "inspector",
13+
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
14+
"runtimeArgs": [
15+
"--remote-debugging-port=9223",
16+
"--hot",
17+
"${workspaceFolder}/index.js"
18+
],
19+
"windows": {
20+
"runtimeExecutable": "${workspaceFolder}/node_modeules/.bin/electron.cmd"
21+
}
22+
},
23+
{
24+
"type": "chrome",
25+
"request": "attach",
26+
"name": "BoostNote Renderer",
27+
"port": 9223,
28+
"webRoot": "${workspaceFolder}",
29+
"sourceMapPathOverrides": {
30+
"webpack:///./~/*": "${webRoot}/node_modules/*",
31+
"webpack:///*": "${webRoot}/*"
32+
}
33+
}
34+
],
35+
"compounds": [
36+
{
37+
"name": "BostNote All",
38+
"configurations": ["BoostNote Main", "BoostNote Renderer"]
39+
}
40+
]
41+
}

.vscode/tasks.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "Build Boostnote",
8+
"group": "build",
9+
"type": "npm",
10+
"script": "watch",
11+
"isBackground": true,
12+
"presentation": {
13+
"reveal": "always",
14+
},
15+
"problemMatcher": {
16+
"pattern":[
17+
{
18+
"regexp": "^([^\\\\s].*)\\\\((\\\\d+,\\\\d+)\\\\):\\\\s*(.*)$",
19+
"file": 1,
20+
"location": 2,
21+
"message": 3
22+
}
23+
]
24+
}
25+
}
26+
]
27+
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"jest": "jest",
1313
"fix": "eslint . --fix",
1414
"lint": "eslint .",
15-
"dev": "node dev-scripts/dev.js"
15+
"dev": "node dev-scripts/dev.js",
16+
"watch": "webpack-dev-server --hot"
1617
},
1718
"config": {
1819
"electron-version": "2.0.7"

webpack.config.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,14 @@ var config = Object.assign({}, skeleton, {
2828
publicPath: 'http://localhost:8080/assets/'
2929
},
3030
debug: true,
31-
devtool: 'cheap-module-eval-source-map'
31+
devtool: 'cheap-module-eval-source-map',
32+
devServer: {
33+
port: 8080,
34+
hot: true,
35+
inline: true,
36+
quiet: true,
37+
publicPath: 'http://localhost:8080/assets/'
38+
}
3239
})
3340

3441
module.exports = config

0 commit comments

Comments
 (0)