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

feat: debug memory variable support view as binary #1035

Merged
merged 9 commits into from
Jul 6, 2022

Conversation

Ricbet
Copy link
Member

@Ricbet Ricbet commented May 16, 2022

Types

  • 🎉 New Features

Background or solution

Kapture.2022-05-16.at.18.17.34.mp4
  1. 该功能只会在插件开启了 supportsReadMemoryRequest 的 capabilities,以及 variable DAP 返回的结果中存在 memoryReference 才会在右键菜单当中出现该选项
  2. 该功能强依赖 hex-editor 插件,如果未安装,点击后会在右下角给出提示
    image

Changelog

Debug 变量面板支持以十六进制视图查看 binary 变量

@Ricbet Ricbet requested review from hacke2, erha19 and Aaaaash May 16, 2022 07:28
@Ricbet Ricbet force-pushed the feat/support-debug-memory-variable-view branch from 1443c33 to 0e6ccc9 Compare May 16, 2022 08:29
@codecov
Copy link

codecov bot commented May 16, 2022

Codecov Report

Merging #1035 (0aa0bdf) into main (9ba14d3) will decrease coverage by 0.14%.
The diff coverage is 14.17%.

@@            Coverage Diff             @@
##             main    #1035      +/-   ##
==========================================
- Coverage   58.02%   57.88%   -0.15%     
==========================================
  Files        1231     1234       +3     
  Lines       77191    77524     +333     
  Branches    16124    16184      +60     
==========================================
+ Hits        44792    44873      +81     
- Misses      29520    29745     +225     
- Partials     2879     2906      +27     
Flag Coverage Δ
jsdom 52.56% <14.17%> (-0.14%) ⬇️
node 15.83% <2.83%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/components/src/icon/iconfont/iconMap.ts 100.00% <ø> (ø)
packages/debug/src/common/debug-session.ts 100.00% <ø> (ø)
.../src/browser/doc-model/editor-document-registry.ts 85.45% <ø> (ø)
packages/extension/src/common/vscode/editor.ts 78.57% <ø> (-0.74%) ⬇️
packages/i18n/src/common/en-US.lang.ts 100.00% <ø> (ø)
packages/i18n/src/common/zh-CN.lang.ts 100.00% <ø> (ø)
packages/debug/src/common/debug-model.ts 17.39% <5.00%> (-82.61%) ⬇️
packages/utils/src/buffer.ts 22.09% <5.40%> (-12.61%) ⬇️
packages/debug/src/browser/debug-memory.ts 9.90% <9.90%> (ø)
packages/debug/src/browser/debug-session.ts 14.76% <20.00%> (+0.12%) ⬆️
... and 40 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9ba14d3...0aa0bdf. Read the comment docs.

@Ricbet Ricbet force-pushed the feat/support-debug-memory-variable-view branch from 89495dc to bf74707 Compare May 16, 2022 09:46
@Ricbet Ricbet changed the title [WIP] feat: debug memory variable support view as binary feat: debug memory variable support view as binary May 16, 2022
@Ricbet
Copy link
Member Author

Ricbet commented May 16, 2022

目前仍有以下几个问题需要待解决

  1. 查看二进制视图时,一开始的做法是新开一个编辑器分组放在最右侧,这样的话就能左边看着代码,右边看着二进制视图。但存在该 issue 所提的 bug,暂时放弃这种交互
  2. 二进制视图打开时会出现非常多的 0 字符,但并不影响功能的正常使用,这块还需要在排查一下原因
  3. 暂时先以右键菜单作为功能入口,之后更好的交互方式是鼠标 hover 之后在最右侧展示该图标

@Ricbet Ricbet self-assigned this May 16, 2022
@Ricbet Ricbet linked an issue May 16, 2022 that may be closed by this pull request
@erha19 erha19 added this to the 2.19 milestone May 17, 2022
@erha19 erha19 mentioned this pull request May 31, 2022
15 tasks
@erha19
Copy link
Member

erha19 commented Jun 24, 2022

@Ricbet 冲突处理一下

@Ricbet Ricbet force-pushed the feat/support-debug-memory-variable-view branch from cbd1fd4 to 5a04bcb Compare June 27, 2022 11:43
packages/debug/src/browser/debug-memory.ts Outdated Show resolved Hide resolved
packages/debug/src/browser/debug-memory.ts Outdated Show resolved Hide resolved
packages/debug/src/browser/debug-memory.ts Outdated Show resolved Hide resolved
@Ricbet Ricbet force-pushed the feat/support-debug-memory-variable-view branch from 5a04bcb to 9c567c2 Compare June 29, 2022 03:25
@erha19
Copy link
Member

erha19 commented Jul 4, 2022

@Ricbet 挂了,看看

@Ricbet Ricbet force-pushed the feat/support-debug-memory-variable-view branch from 28a6d47 to 0aa0bdf Compare July 6, 2022 02:31
@erha19 erha19 merged commit 74990a7 into main Jul 6, 2022
@erha19 erha19 deleted the feat/support-debug-memory-variable-view branch July 6, 2022 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Debug 变量需要以更好的视图查看 binary 数据
2 participants