WebFreak001 / code-debug

Native debugging for VSCode
The Unlicense
410 stars 115 forks source link

Add `registerLimit` config option to specify the registers to list in Registers view #444

Closed chenzhiy2001 closed 2 months ago

chenzhiy2001 commented 2 months ago

In cases like #421, fetching unfetchable registers can corrupt the whole Registers view.

So I added registerLimit config option to let users specify what registers they want the debugger to automatically fetch, thus avoiding the issue.

GitMensch commented 2 months ago

spell check linter failed on "unfetchable", I've asked chatgpt4 for an adjusted text and it changed some other pieces as well, coming up with (after some hinting)

There is a Registers view in the VARIABLES view. As we fetch all registers at once, there can
be cases where a register that cannot be fetched causes the entire register request to fail,
corrupting the entire Registers output. If this happens, you might need to set the
`registerLimit` option to specify which registers you want the debugger to fetch
automatically.  
For example, to display only registers `rax` and `rip` in an x64 debug session, send the
command `-data-list-register-names` in the debug console of an active x64 debug session.
You will then receive a response containing an array starting with `["rax","rbx" ...]`.
In this array, the index of `rax` is 0 and `rip` is 16, so set the option as
`"registerLimit": "0 16"`. If you find the response text hard to navigate, you can paste
it into a browser's developer tools console and press enter to get an expandable response
object with array elements' indices explicitly displayed.
chenzhiy2001 commented 2 months ago

The introduction paragraph in README.md is being swapped by the new version now.

codecov-commenter commented 2 months ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.

Project coverage is 22.52%. Comparing base (1b9f13e) to head (bf77aa8). Report is 16 commits behind head on master.

Files with missing lines Patch % Lines
src/gdb.ts 0.00% 2 Missing :warning:
src/lldb.ts 0.00% 2 Missing :warning:
src/mago.ts 0.00% 2 Missing :warning:
src/backend/mi2/mi2.ts 0.00% 1 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #444 +/- ## ========================================== + Coverage 20.47% 22.52% +2.05% ========================================== Files 14 14 Lines 1807 1891 +84 Branches 392 416 +24 ========================================== + Hits 370 426 +56 - Misses 1392 1465 +73 + Partials 45 0 -45 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

GitMensch commented 2 months ago

I've run the prettier stuff locally, that's the diff you need to apply to fix the failing CI

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 602bf5a..47db805 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,7 +22,8 @@ Versioning].
   enabled by default ([@JacquesLucke])
 - Suppress error for hover as the user may just play with the mouse ([@oltolm]).
 - solve the problem of failed parsing of containers ([@henryriley0])
-- Resolves #421 - Added `registerLimit` option to specify the registers to display to avoid corrupting the whole registers view - PR #444 ([@chenzhiy2001])
+- Fixes #421 - Added `registerLimit` option to specify the registers to
+  display - PR #444 ([@chenzhiy2001])

 ## [0.27.0] - 2024-02-07

@@ -244,6 +245,7 @@ Versioning].
 [@abussy-aldebaran]: https://github.com/abussy-aldebaran
 [@anshulrouthu]: https://github.com/anshulrouthu
 [@brownts]: https://github.com/brownts
+[@chenzhiy2001]: https://github.com/chenzhiy2001
 [@coldencullen]: https://github.com/ColdenCullen
 [@eamousing]: https://github.com/eamousing
 [@evangrayk]: https://github.com/evangrayk
chenzhiy2001 commented 2 months ago

Oops, I forgot to run npm run prettier-write-docs. Could you please reopen this pull request so that the correct modification of CHANGELOG.md show up here?

GitMensch commented 2 months ago

I have no clue why the close happened...

chenzhiy2001 commented 2 months ago

I have no clue why the close happened...

Sometimes Github gets really confusing. I also felt that.

GitMensch commented 2 months ago

It says "The master branch was force-pushed", please try to just push the change yourself, if the reopen still doesn't work afterwards, create a new PR (leaving the old PR reference in). See the suggested ChangeLog diff above.