Skip to content

Commit

Permalink
feature: vscode debug config support (#446)
Browse files Browse the repository at this point in the history
* feature: vscode debug config support

* improment vscode debug settings
  • Loading branch information
enyaxu authored and Jocs committed Aug 12, 2018
1 parent 486eb93 commit ab6e103
Show file tree
Hide file tree
Showing 2 changed files with 40 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 @@
{
// Use IntelliSense to learn about possible 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": "Marktext: Main",
"program": "${workspaceFolder}/.electron-vue/dev-runner.js",
"windows": {
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd"
}
},
{
"name": "Marktext: Renderer",
"type": "chrome",
"request": "attach",
"port": 8315,
"webRoot": "${workspaceFolder}/src",
"timeout": 30000,
"urlFilter": "localhost:*"
}
],
"compounds": [
{
"name": "Marktext: All",
"configurations": [
"Marktext: Main",
"Marktext: Renderer"
]
}
]
}
5 changes: 5 additions & 0 deletions src/main/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ class App {
app.commandLine.appendSwitch('enable-experimental-web-platform-features', 'true')
}

// Enable vscode chrome extension debugger connection
if (process.env.NODE_ENV === 'development') {
app.commandLine.appendSwitch('remote-debugging-port', '8315')
}

app.on('open-file', this.openFile.bind(this))

app.on('ready', this.ready.bind(this))
Expand Down

0 comments on commit ab6e103

Please sign in to comment.