Skip to content
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

fix: invalid breakpoints line number error #3037

Merged
merged 2 commits into from
Sep 7, 2023

Conversation

erha19
Copy link
Member

@erha19 erha19 commented Sep 5, 2023

Types

  • 🐛 Bug Fixes

Background or solution

🤖 Generated by Copilot at 44a6c09

  • Prevent setting and rendering breakpoints on lines that exceed the editor model's maximum line count (link, link, link)
  • Refactor the code for updating the breakpoint description from the BreakpointsService class in debug-breakpoints.service.ts to the DebugModel class in debug-model.ts (link)

close #3022.

Changelog

🤖 Generated by Copilot at 44a6c09

This pull request improves the breakpoint functionality and rendering in the debug editor. It fixes some bugs with invalid breakpoints and breakpoint descriptions, and refactors the code to move some logic from the breakpoints.service.ts file to the debug-model.ts file.

@erha19 erha19 requested a review from Ricbet September 5, 2023 08:35
@opensumi opensumi bot added the 🐞 bug Something isn't working label Sep 5, 2023
@opensumi
Copy link
Contributor

opensumi bot commented Sep 5, 2023

ChatGPT Code Review:

代码存在以下错误和修改建议:

  • 第一个diff中的代码在检查行号是否大于最大行数时,使用了错误的变量名。将maxLineCount改为maxLine
  • 第二个diff中的代码在检查行号是否大于最大行数时,使用了错误的变量名。将maxLineCount改为maxLine

代码的功能描述如下:

  • 第一个diff中的代码主要是在调试模型中的DebugModel类中的updateBreakpointDecorations方法和removeBreakpointDecorations方法中进行了修改。修改后的代码在行号大于最大行数时,不再进行相应的操作。
  • 第二个diff中的代码主要是在调试断点服务中的DebugBreakpointsService类中的fireDescriptionChangeEvent方法中进行了修改。修改后的代码在行号大于最大行数时,不再进行相应的操作。

@erha19
Copy link
Member Author

erha19 commented Sep 5, 2023

@geekeren 修复了,可以试试这个版本

@opensumi opensumi bot added the ⚙️ refactor Refactor code label Sep 5, 2023
@erha19
Copy link
Member Author

erha19 commented Sep 5, 2023

/next

@opensumi
Copy link
Contributor

opensumi bot commented Sep 5, 2023

🎉 PR Next version 2.26.8-next-1693903293.0 publish successful! You can install this version via npm install package@2.26.8-next-1693903293.0

2.26.8-next-1693903293.0

@codecov
Copy link

codecov bot commented Sep 7, 2023

Codecov Report

Patch coverage is 10.00% of modified lines.

Files Changed Coverage
...wser/view/breakpoints/debug-breakpoints.service.ts 0.00%
packages/debug/src/browser/editor/debug-model.ts 20.00%

📢 Thoughts on this report? Let us know!.

@bytemain bytemain merged commit b55bc73 into main Sep 7, 2023
11 checks passed
@bytemain bytemain deleted the fix/invalid-breakponts-error branch September 7, 2023 13:06
@bytemain
Copy link
Member

/backport to v2.26

@opensumi
Copy link
Contributor

opensumi bot commented Sep 11, 2023

Backporting to v2.26 branch is started.
Please see: https://github.com/opensumi/actions/actions/workflows/backport-pr.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working ⚙️ refactor Refactor code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] 调试断点设置异常
2 participants