Merged
Conversation
There was a problem hiding this comment.
Pull request overview
该 PR 修复调试器在暂停状态移除断点后,继续执行(Continue)仍会命中已删除断点的问题;核心是防止 worker 端残留的 waitverify 在后续 newproto 时把旧断点重新 verify 并重新挂钩,导致断点“复活”。
Changes:
- 在
set_bp的srcarray分支处理完成后,清理对应的waitverify条目,避免旧断点残留被后续流程重新激活 - 补充调用
updateHook(),使 hook 开关状态与最新的断点集合及时同步
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Code Review
This pull request modifies the breakpoint management logic in extension/script/backend/worker/breakpoint.lua. Specifically, it ensures that the waitverify state for a client is cleared and the debug hook is updated once breakpoints are processed. I have no feedback to provide as no review comments were submitted for evaluation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
在命中断点后,如果在暂停状态把该断点移除,再点击 Continue,调试器仍会继续命中这个已经删除的断点。
从
client.log可见关键时序:setBreakpoints(..., breakpoints: [])breakpoint changed (id:1, verified:true)stopped (hitBreakpointIds:[1])这说明被删除的断点在运行过程中被重新激活了。
根因
worker 端在
set_bp中如果已经能解析到srcarray,会更新currentactive,但不会同步清理waitverify[bpClientKey]。当后续有新 proto 加载时,
newproto会优先读取残留的waitverify,从而把旧断点重新 verify 并重新加入 hook,导致已删除断点“复活”。修复
在
set_bp的srcarray分支完成处理后,补充:waitverify[bpClientKey(clientsrc)]updateHook()同步 hook 状态这样后续
newproto将依据最新的currentactive,不会再从过期waitverify复活已删除断点。额外说明
本次提交按要求移除了新增代码注释,仅保留必要逻辑变更。