Skip to content

Commit

Permalink
Merge branch 'master' into cleanup-on-start
Browse files Browse the repository at this point in the history
  • Loading branch information
GitMensch authored Nov 25, 2024
2 parents 8b1188c + eb9f5e4 commit ab71b94
Show file tree
Hide file tree
Showing 18 changed files with 565 additions and 157 deletions.
22 changes: 21 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,21 @@ Versioning].

## Unreleased

### Added

- fix missing output of variable type for structure ([@henryriley0])
- add static variable support ([@henryriley0])
- fix gdb check error when debug beginning ([@henryriley0])
- fix implicitly type error in log message when build vsix ([@henryriley0])
- check for configured debugger before start to provide a nicer error message
([@GitMensch])
- New `frameFilters` option for GDB that allows using custom frame filters,
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])
- Fixes #421 - Added `registerLimit` option to specify the registers to
display - PR #444 ([@chenzhiy2001])

### Fixed

- close invalid existing sockets from previous usage of this extension during
Expand All @@ -22,6 +37,8 @@ Versioning].
- Added registers view ([@nomtats]) #242
- Enabled breakpoints inside `riscv` files ([@William-An]) #404

[0.27.0]: https://github.com/WebFreak001/code-debug/compare/v0.26.1...v0.27.0

## [0.26.1] - 2022-12-31

### Fixed
Expand Down Expand Up @@ -233,13 +250,16 @@ 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
[@faustinoaq]: https://github.com/faustinoaq
[@gentoo90]: https://github.com/gentoo90
[@gitmensch]: https://github.com/GitMensch
[@haronk]: https://github.com/HaronK
[@henryriley0]: https://github.com/HenryRiley0
[@jacqueslucke]: https://github.com/JacquesLucke
[@jelleroets]: https://github.com/JelleRoets
[@karljs]: https://github.com/karljs
[@kvinwang]: https://github.com/kvinwang
Expand All @@ -252,7 +272,7 @@ Versioning].
[@reznikmm]: https://github.com/reznikmm
[@simark]: https://github.com/simark
[@webfreak001]: https://github.com/WebFreak001
[@William-An]: https://github.com/William-An
[@william-an]: https://github.com/William-An
[@yanpas]: https://github.com/Yanpas

<!-- markdownlint-configure-file { "MD024": { "siblings_only": true } } -->
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,20 @@ that location prior to continuing execution. Note that stopping at the entry po
attach configuration assumes that the entry point has not yet been entered at the time of
attach, otherwise this will have no affect.

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.

### Attaching to existing processes

Attaching to existing processes currently only works by specifying the PID in the
Expand Down Expand Up @@ -213,4 +227,10 @@ differently based on whether the remote system is a POSIX or a Windows system.
You may need to experiment to find the correct escaping necessary for the command to be
sent to the debugger as you intended.

### LogMessage

LogMessage will print a message in the debug console when breakpoint is hit. Expressions within {} are interpolated.

![LogMessage](images/logMessage.gif)

## [Issues](https://github.com/WebFreak001/code-debug)
Binary file added images/logMessage.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
69 changes: 60 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 44 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"debug"
],
"license": "public domain",
"version": "0.27.0",
"version": "0.27.1",
"publisher": "webfreak",
"icon": "images/icon.png",
"engines": {
Expand Down Expand Up @@ -187,13 +187,18 @@
"valuesFormatting": {
"type": "string",
"description": "Set the way of showing variable values. 'disabled' - show value as is, 'parseText' - parse debuggers output text into structure, 'prettyPrinters' - enable debuggers custom pretty-printers if there are any",
"default": "parseText",
"default": "prettyPrinters",
"enum": [
"disabled",
"parseText",
"prettyPrinters"
]
},
"frameFilters": {
"type": "boolean",
"description": "Use frame filters registered in GDB",
"default": true
},
"printCalls": {
"type": "boolean",
"description": "Prints all GDB calls to the console",
Expand Down Expand Up @@ -294,6 +299,11 @@
"description": "Content will be executed on the SSH host before the debugger call."
}
}
},
"registerLimit": {
"type": "string",
"description": "List of numbers specifying the registers to display. An empty string indicates that the contents of all the registers must be returned.",
"default": ""
}
}
},
Expand Down Expand Up @@ -322,6 +332,11 @@
"prettyPrinters"
]
},
"frameFilters": {
"type": "boolean",
"description": "Use frame filters registered in GDB",
"default": true
},
"printCalls": {
"type": "boolean",
"description": "Prints all GDB calls to the console",
Expand Down Expand Up @@ -458,6 +473,11 @@
"description": "Content will be executed on the SSH host before the debugger call."
}
}
},
"registerLimit": {
"type": "string",
"description": "List of numbers specifying the registers to display. An empty string indicates that the contents of all the registers must be returned.",
"default": ""
}
}
}
Expand Down Expand Up @@ -756,6 +776,11 @@
"description": "Content will be executed on the SSH host before the debugger call."
}
}
},
"registerLimit": {
"type": "string",
"description": "List of numbers specifying the registers to display. An empty string indicates that the contents of all the registers must be returned.",
"default": ""
}
}
},
Expand Down Expand Up @@ -836,6 +861,11 @@
],
"description": "Whether debugger should stop at application entry point",
"default": false
},
"registerLimit": {
"type": "string",
"description": "List of numbers specifying the registers to display. An empty string indicates that the contents of all the registers must be returned.",
"default": ""
}
}
}
Expand Down Expand Up @@ -982,6 +1012,11 @@
"type": "array",
"description": "mago commands to run when starting to debug",
"default": []
},
"registerLimit": {
"type": "string",
"description": "List of numbers specifying the registers to display. An empty string indicates that the contents of all the registers must be returned.",
"default": ""
}
}
},
Expand Down Expand Up @@ -1047,6 +1082,11 @@
"type": "boolean",
"description": "Whether debugger should stop after connecting to target",
"default": false
},
"registerLimit": {
"type": "string",
"description": "List of numbers specifying the registers to display. An empty string indicates that the contents of all the registers must be returned.",
"default": ""
}
}
}
Expand Down Expand Up @@ -1112,6 +1152,7 @@
"@istanbuljs/nyc-config-typescript": "^1.0.2",
"@types/mocha": "^5.2.6",
"@types/node": "^11.11.3",
"@types/ssh2": "^1.15.0",
"@types/vscode": "^1.55.0",
"@typescript-eslint/eslint-plugin": "^5.22.0",
"@typescript-eslint/parser": "^5.22.0",
Expand All @@ -1125,7 +1166,7 @@
"nyc": "^15.1.0",
"prettier": "^2.6.2",
"ts-node": "^10.8.0",
"typescript": "^3.9.3"
"typescript": "^4.3.2"
},
"__metadata": {
"id": "2fd22b8e-b3b8-4e7f-9a28-a5e2d1bdd0d4",
Expand Down
Loading

0 comments on commit ab71b94

Please sign in to comment.