【发布时间】:2015-07-12 15:03:44
【问题描述】:
由于 Visual Studio Code 是使用 Electron 创建的,我猜测可能将 launch.json 配置为使用 Electron 正确启动应用程序。但我还没想好怎么做。
另外,由于 Electron 是基于 io.js,它本身基于 Node.js,我想也许……可以做到,但还没有找到魔力。
尝试了这些方面的东西...来自launch.json的sn-p:
"configurations": [
{
// Name of configuration; appears in the launch configuration drop down menu.
"name": "Launch Electron",
// Type of configuration. Possible values: "node", "mono".
"type": "node",
// Workspace relative or absolute path to the program.
"program": "Y:\\dev\\electron\\electron.exe",
// Automatically stop program after launch.
"stopOnEntry": false,
// Command line arguments passed to the program.
"args": ["CrawlSpace_Electron\\"],
// Workspace relative or absolute path to the working directory of the program being debugged. Default is the current workspace.
"cwd": ".",
// Workspace relative or absolute path to the runtime executable to be used. Default is the runtime executable on the PATH.
"runtimeExecutable": null,
// Environment variables passed to the program.
"env": { }
},
它确实启动了 Electron,但是失败了(窗口消失得太快,看不出确切的原因)。
有什么想法吗?
【问题讨论】:
-
好主意,我会试一试。 Isidor,vscode 团队
-
在 Visual Studio 代码中调试电子 - 修订:electron.rocks/debugging-electron-in-vs-code-revised
标签: visual-studio-code electron