mirror of
https://github.com/marktext/marktext.git
synced 2025-05-02 01:51:51 +08:00
feature: vscode debug config support (#446)
* feature: vscode debug config support * improment vscode debug settings
This commit is contained in:
parent
486eb933b0
commit
ab6e103983
35
.vscode/launch.json
vendored
Normal file
35
.vscode/launch.json
vendored
Normal file
@ -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"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user