Fixed vscode debugging code

Fixes app.getPath("userData") pointing to the wrong folder. (electron in %appdata%)

The old debugger essentially runs:
.\node_modules\.bin\electron main.js

Which makes userData incorrect and various other things wrong related to app launch.

The new version correctly executes:
.\node_modules\.bin\electron .

Which means when you call app.getPath("userData") it will return the correct folder name, and not 'electron', which is what my app was doing even though the folder was named properly.
This commit is contained in:
Gordon MacPherson 2017-05-20 14:56:26 +01:00 committed by GitHub
parent 8404bdd568
commit 9b4fef3c38

View file

@ -19,7 +19,10 @@ $ code electron-quick-start
"request": "launch", "request": "launch",
"cwd": "${workspaceRoot}", "cwd": "${workspaceRoot}",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron", "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
"program": "${workspaceRoot}/main.js" "windows": {
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd"
},
"args" : ["."]
} }
] ]
} }