adobe / adobe/aio-cli-plugin-runtime

Unable to debug runtime action from vscode because of invalid .vscode/launch.json

未关闭
#308 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
21
派生
33
PR 合并指标
30 天内没有已合并 PR

描述

**Describe the bug**
Unable to debug runtime action from vscode because of invalid '.vscode/launch.json' (similar to #244)

The generated .vscode/launch.json look like this (**note the wrong envFile property**).
```
{
"configurations": [
{
"type": "pwa-node",
"name": "Action:wknd-spa-react-0.1.0/ssr",
"request": "launch",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/wskdebug",
"envFile": "${workspaceFolder}//Users/johndoe/Downloads/aem-guides-wknd-spa.react.ssr/ui.frontend/dist/application/.env.local",
"timeout": 30000,
"killBehavior": "polite",
"localRoot": "${workspaceFolder}",
"remoteRoot": "/code",
"outputCapture": "std",
"attachSimplePort": 0,
"runtimeArgs": [
"wknd-spa-react-0.1.0/ssr",
"${workspaceFolder}/actions/ssr/index.js",
"-v",
"--disable-concurrency",
"--kind",
"nodejs:10"
]
}
],
"compounds": [
{
"name": "Actions",
"configurations": [
"Action:wknd-spa-react-0.1.0/ssr"
]
}
]
}
```

**To Reproduce**
Steps to reproduce the behavior:
1. Create an AEM Project using [AEM Project Archetype](https://github.com/adobe/aem-project-archetype) with SSR enabled
2. Follow the instructions in `ui.frontend/README.md` to debug AEM SSR via local Docker image of OpenWhisk
3. Run `npm run build-with-ssr`
4. Run `npm run start-ssr-ioruntime`
5. Attach the debugger via provided VS Code Launch configuration and observe the Debug Console

**Expected behavior**
Debugger attaches without any errors.

**Screenshots**
Screenshot 2023-06-16 at 14 08 04

**Desktop (please complete the following information):**
- OS: macOS Ventura 13.4

**Additional context**
Add any other context about the problem here.

贡献指南

打开贡献指南

调研方向

从生成的 .vscode/launch.json 和 ui.frontend/README.md 中的 SSR 调试说明开始。使用 npm run build-with-ssr 和 npm run start-ssr-ioruntime 重现该问题,然后跟踪 VS Code 启动配置的生成过程。当生成的 envFile 路径有效且调试器能够无错误地附加时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript
领域
cli
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。