core icon indicating copy to clipboard operation
core copied to clipboard

[BUG] 运行 playwright 单文件调试无法正常调试

Open erha19 opened this issue 3 years ago • 1 comments

描述你的问题(Describe the bug)

报错信息

image

复现路径(To Reproduce)

编辑 launch.json, 追加如下内容 :

{
      "name": "Playwright Current File",
      "type": "node",
      "request": "launch",
      "program": "${workspaceFolder}/tools/playwright/node_modules/.bin/playwright",
      "args": ["test", "--debug", "--config=./configs/playwright.debug.config.ts", "${fileBasenameNoExtension}"],
      "cwd": "${workspaceFolder}/tools/playwright",
      "console": "integratedTerminal",
      "internalConsoleOptions": "neverOpen"
 }

运行调试

预期表现(Expected behavior)

可以正常调试并断点

erha19 avatar Jul 20 '22 08:07 erha19

排查到具体报错信息为

"Error processing launch: TypeError: Cannot read property 'processId' of undefinedError: Cannot read property 'processId' of undefined

定位到特定 JS Debug 逻辑,启动时依赖 Terminal 返回结果中的 processId,在 OpenSumi 中没有返回导致该问题。

https://github.com/microsoft/vscode-js-debug/blob/55c3f6e833aeb5ff31ca0a2a770451fe212b40bd/src/targets/node/program.ts#L148

erha19 avatar Jul 20 '22 08:07 erha19

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Oct 12 '22 17:10 stale[bot]