adobe / adobe/aio-cli-plugin-runtime

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

Đang mở
#308 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
21
Fork
33
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

**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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với .vscode/launch.json được tạo và hướng dẫn gỡ lỗi SSR trong ui.frontend/README.md. Tái hiện sự cố bằng npm run build-with-ssr và npm run start-ssr-ioruntime, sau đó truy vết cách cấu hình khởi chạy VS Code được tạo. Hoàn thành khi đường dẫn envFile được tạo là hợp lệ và trình gỡ lỗi kết nối mà không có lỗi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
javascript
Lĩnh vực
cli
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.