| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- {
- "version": "0.2.0", // 配置文件版本号(由VSCode定义,勿修改)
- "configurations": [
-
-
- {
- // 开发环境调试配置
- "name": "调试 UniApp Weixin", // 配置项显示名称
- "type": "node", // 调试器类型(Node.js环境)
- "request": "launch", // 启动模式(launch/attach)
- // "runtimeExecutable": "npm", // 使用npm作为运行时
- "runtimeExecutable": "C:\\Program Files\\nodejs\\npm.cmd",
- "runtimeArgs": ["run", "dev:mp-weixin"], // 运行的npm脚本命令
- "console": "integratedTerminal", // 在VSCode内置终端显示输出
- "skipFiles": ["<node_internals>/**"], // 调试时跳过的文件
- "presentation": { // 终端显示配置
- "reveal": "always", // 总是显示终端面板
- "panel": "dedicated" // 使用独立终端(避免与其他输出混合)
- }
- },
- {
- "name": "调试 UniApp H5",
- "type": "node",
- "request": "launch",
- "runtimeExecutable": "C:\\Program Files\\nodejs\\npm.cmd",
- "runtimeArgs": ["run", "dev:h5"],
- "console": "integratedTerminal",
- "skipFiles": ["<node_internals>/**"],
- "presentation": {
- "reveal": "always",
- "panel": "dedicated"
- }
- },
- {
- // 生产环境构建配置
- "name": "Build UniApp Weixin", // 配置项显示名称
- "type": "node", // 调试器类型
- "request": "launch", // 启动模式
- "runtimeExecutable": "npm", // 使用npm作为运行时
- "runtimeArgs": ["run", "build:mp-weixin"], // 运行的npm脚本命令
- "console": "integratedTerminal" // 在VSCode内置终端显示输出
- // 注:生产构建通常不需要调试,故省略presentation配置
- }
- ]
- }
|