Skip to content

Commit

Permalink
Added launch.example.json
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverschwendener committed Nov 29, 2018
1 parent 3c593aa commit 475cb52
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
.DS_Store

#Visual Studio Code files
.vscode/*
!.vscode/launch.example.json

#Bundled files
bundle/

Expand Down
50 changes: 50 additions & 0 deletions .vscode/launch.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
// Use IntelliSense to learn about possible Node.js debug attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Electron Main",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
"program": "${workspaceRoot}/src/ts/main.ts",
"protocol": "inspector",
"sourceMaps": true,
"cwd": "${workspaceRoot}",
"outFiles": [
"${workspaceRoot}/bundle/main.js"
]
},
{
"name": "Electron Renderer",
"type": "chrome",
"request": "launch",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
"windows": {
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd"
},
"runtimeArgs": [
"${workspaceRoot}/bundle/main.js",
"--remote-debugging-port=9222"
],
"port": 9222,
"webRoot": "${workspaceRoot}"
},
{
"type": "node",
"request": "launch",
"name": "Jest Tests",
"program": "${workspaceRoot}/node_modules/jest/bin/jest",
"args": [
"--runInBand",
"--config",
"jest.json",
"src/tests"
],
"console": "internalConsole",
"internalConsoleOptions": "neverOpen",
}
]
}
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,9 @@ $ yarn start

> For debugging you need Visual Studio Code

Run the app in one of these debug modes:

* Electron Main
* Electron Renderer
* Jest tests
1. Go to `.vscode` folder
2. Make a copy of `launch.example.json` and rename it to `launch.json`
3. Select one of the preconfigured debug modes and start debugging


### Run tests
Expand Down

0 comments on commit 475cb52

Please sign in to comment.