ArcherGu / fast-vite-nestjs-electron

Vite + Vue + Electron + Nestjs with esbuild, crazy fast! ⚡

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

如何使用 vscode debug ?

edwinhuish opened this issue · comments

如题

已找到解决方法,如下配置:

vite plugin 配置

VitePluginDoubleshot({
  // 其他配置。。。
  configureForMode: (config, mode) => {
    if (mode !== "production") {
      config.debug = true;
    }

    return config;
  }
})

.vscode/launch.json

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Launch via NPM",
      "request": "launch",
      "runtimeArgs": ["run-script", "dev"],
      "runtimeExecutable": "npm",
      "skipFiles": ["<node_internals>/**"],
      "type": "node"
    }
  ]
}

不好意思,这两天春节假期没有及时回复。
这个是支持debug的,配合vscode自带的debug就行。另外就是要在配置里启动debug模式。