Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Commit

Permalink
Add config for debugging Oni in VSCode (#255)
Browse files Browse the repository at this point in the history
* add config for debugging Oni in VSCode

* add statement about provided vscode launch configurations
  • Loading branch information
keforbes authored and extr0py committed Feb 25, 2017
1 parent b83a467 commit e660f7b
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"version": "0.2.0",
"configurations": [
{
// Debug files that configure Electron (main.js, Menu.js, etc.)
"name": "Oni Main Process",
"type": "node",
"request": "launch",
"cwd": "${workspaceRoot}",
"program": "${workspaceRoot}/main.js",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
"runtimeArgs": [
"--enable-logging"
],
"console": "internalConsole"
},
{
// Debug typescript files
// (must run `npm run build-debug` first to generate bundle.js.map)
"name": "Oni Application",
"type": "chrome", // <-- requires Extension "Debugger for Chrome"
"request": "launch",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
"runtimeArgs": [
"--enable-logging",
"${workspaceRoot}/main.js"
],
"webRoot": "${workspaceRoot}",
"sourceMaps": true,
"sourceMapPathOverrides": {
"webpack:///./*": "${webRoot}/*"
}
}
]
}
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ In order to build a source-map enabled build, you can do the following:
- `npm link` (only needed the first time)
- `oni`

Debugging in [VSCode](https://github.com/Microsoft/vscode)? Default launch configurations are provided for debugging both the Electron main process and Oni application from VSCode.

## Production build

A production build removes sourcemaps and applies minification, so it's worth testing in this config:
Expand Down

0 comments on commit e660f7b

Please sign in to comment.