Error in Running Chrome Debug Instance when the Chrome window is open
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 38/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- java, javascript, node.js, react
调研方向
使用列出的 React、Node.js、Chrome 和 Eclipse 步骤复现该故障,然后通过 ChromeAttachDebugDelegate.launch 以及堆栈跟踪中显示的 DSP 调试初始化过程追踪启动路径。比较关闭所有 Chrome 窗口时与存在一个 Chrome 窗口时的行为;当找到配置的 localhost URL 且调试在没有 about:blank 超时的情况下启动时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
When the Chrome window is open and I try to run Chrome Debug Instance, I get the error:
!ENTRY org.eclipse.wildwebdeveloper 4 0 2022-10-27 11:11:14.029
!MESSAGE Unexpected exception
!STACK 1
org.eclipse.debug.core.DebugException: Unexpected exception
at org.eclipse.lsp4e.debug.debugmodel.DSPDebugElement.monitorGet(DSPDebugElement.java:100)
at org.eclipse.lsp4e.debug.debugmodel.DSPDebugTarget.initialize(DSPDebugTarget.java:185)
at org.eclipse.lsp4e.debug.launcher.DSPLaunchDelegate.createDebugTarget(DSPLaunchDelegate.java:370)
at org.eclipse.lsp4e.debug.launcher.DSPLaunchDelegate.launch(DSPLaunchDelegate.java:350)
at org.eclipse.wildwebdeveloper.debug.AbstractHTMLDebugDelegate.launchWithParameters(AbstractHTMLDebugDelegate.java:44)
at org.eclipse.wildwebdeveloper.debug.chrome.ChromeAttachDebugDelegate.launch(ChromeAttachDebugDelegate.java:43)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:806)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:717)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1021)
at org.eclipse.debug.internal.ui.DebugUIPlugin$2.run(DebugUIPlugin.java:1224)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.util.concurrent.ExecutionException: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Cannot connect to runtime process, timeout after 10000 ms - (reason: Can't find a valid target that matches: about:blank. Available pages: ["file:///home/s052328876/my-app/node_modules/react-scripts/scripts/start.js"]).
at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096)
at org.eclipse.lsp4e.debug.debugmodel.DSPDebugElement.monitorGet(DSPDebugElement.java:86)
... 10 more
Caused by: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Cannot connect to runtime process, timeout after 10000 ms - (reason: Can't find a valid target that matches: about:blank. Available pages: ["file:///home/s052328876/my-app/node_modules/react-scripts/scripts/start.js"]).
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:209)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:193)
at org.eclipse.lsp4j.jsonrpc.validation.ReflectiveMessageValidator.consume(ReflectiveMessageValidator.java:68)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1589)
!SUBENTRY 1 org.eclipse.lsp4e.debug 4 5010 2022-10-27 11:11:14.030
!MESSAGE Unexpected exception
!STACK 0
java.util.concurrent.ExecutionException: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Cannot connect to runtime process, timeout after 10000 ms - (reason: Can't find a valid target that matches: about:blank. Available pages: ["file:///home/s052328876/my-app/node_modules/react-scripts/scripts/start.js"]).
at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096)
at org.eclipse.lsp4e.debug.debugmodel.DSPDebugElement.monitorGet(DSPDebugElement.java:86)
at org.eclipse.lsp4e.debug.debugmodel.DSPDebugTarget.initialize(DSPDebugTarget.java:185)
at org.eclipse.lsp4e.debug.launcher.DSPLaunchDelegate.createDebugTarget(DSPLaunchDelegate.java:370)
at org.eclipse.lsp4e.debug.launcher.DSPLaunchDelegate.launch(DSPLaunchDelegate.java:350)
at org.eclipse.wildwebdeveloper.debug.AbstractHTMLDebugDelegate.launchWithParameters(AbstractHTMLDebugDelegate.java:44)
at org.eclipse.wildwebdeveloper.debug.chrome.ChromeAttachDebugDelegate.launch(ChromeAttachDebugDelegate.java:43)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:806)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:717)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1021)
at org.eclipse.debug.internal.ui.DebugUIPlugin$2.run(DebugUIPlugin.java:1224)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Cannot connect to runtime process, timeout after 10000 ms - (reason: Can't find a valid target that matches: about:blank. Available pages: ["file:///home/s052328876/my-app/node_modules/react-scripts/scripts/start.js"]).
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:209)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:193)
at org.eclipse.lsp4j.jsonrpc.validation.ReflectiveMessageValidator.consume(ReflectiveMessageValidator.java:68)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1589)
The application does not appear, and a blank tab is loaded, at the url "about:blank".
Steps to reproduce:
- Create a react application:
npx create-react-app my-app
cd my-app
- Create an Eclipse project in
my-appfolder. - Edit the file
my-app/package.jsonadding the following line to thescriptskey:
"debug": "react-scripts --inspect=127.0.0.1:9222 start"
- Start the application with the command:
npm run debug
- Access the Eclipse menu:
Run -> Debug Configurations -> Running Chrome Debug Instance
And create a new configuration.
6. Fill the URL field with: http://localhost:3000
7. Click in Apply
8. Click in Debug
When all Chrome windows are closed, the issue does not occur. However, it is bad to have to close Chrome every time we go to debug.
Refs:
https://github.com/Microsoft/vscode-chrome-debug-core/issues/324
https://stackoverflow.com/questions/45592581/cannot-debug-in-vs-code-by-attaching-to-chrome
Environment
Eclipse 4.25.0
Java 18
Ubuntu 22
node 16.17.0
Chrome 105
wildweb 0.15.1
- 主要语言
- Java
- 星标
- 201
- 派生
- 76
- 平均合并
- 4 天 7 小时
- 30 天内合并 PR
- 21
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
eclipse-wildwebdeveloper/wildwebdeveloper 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 45/100
-
enhancement
难度 5/5 一周以上 新手友好度 25/100
eclipse-wildwebdeveloper/wildwebdeveloper#2122 · 2 条评论 ·
-
enhancement
难度 4/5 3-5 天 新手友好度 35/100
eclipse-wildwebdeveloper/wildwebdeveloper#2070 · 1 条评论 ·
-
ESLintLanguageServer and JSTSLanguageServer do not support node memory limits (--max-old-space-size) 未关闭
难度 3/5 1-2 天 新手友好度 48/100
eclipse-wildwebdeveloper/wildwebdeveloper#2027 · 2 条评论 ·
-
Renaming a variable leads to entire contents of the file editor being replaced with one word- Error 未关闭
难度 4/5 3-5 天 新手友好度 42/100
eclipse-wildwebdeveloper/wildwebdeveloper#1974 · 5 条评论 ·
查看 eclipse-wildwebdeveloper/wildwebdeveloper 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 76/100
-
bug needs triage
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 1/5 1 小时以内 新手友好度 94/100
objectionary/hone-maven-plugin#1061 ·
-
type:bug
难度 2/5 1-3 小时 新手友好度 72/100