-
Notifications
You must be signed in to change notification settings - Fork 69
fix: can`t handle terminated event from debugpy #1119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Log: cppdap does not process event which body is empty, but 'body'is an optional filed, it should handle such cases. Bug:
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: LiHua000 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Reviewer's GuideThis PR removes manual thread tracking and termination handling from the DAP debugger and updates the DAP session deserializer to gracefully handle empty bodies for specific events (notably "terminated"). File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @LiHua000 - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
@@ -418,7 +419,9 @@ class Impl : public dap::Session { | |||
// "body" is an optional field for some events, such as "Terminated Event". | |||
bool body_ok = true; | |||
d->field("body", [&](dap::Deserializer* d) { | |||
if (!typeinfo->deserialize(d, data)) { | |||
// todo: to completed | |||
std::set<std::string> bodyCanBeEmpty { "terminated" }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Optimize optional-body lookup and broaden handling
Make bodyCanBeEmpty
a static const
to avoid reallocations, and review the DAP spec for other events (e.g. initialized
, stopped
) that may omit a body to prevent false negatives.
…ebugging starts. Log: as title Bug:
deepin pr auto review代码审查意见:
以上是本次代码审查的改进意见,希望能够对您有所帮助。 |
Log: cppdap does not process event which body is empty, but 'body'is an optional filed, it should handle such cases.
Bug:
Summary by Sourcery
Allow processing of DAP events with empty bodies and remove obsolete thread-based termination logic.
Bug Fixes:
Enhancements: