Ask Learn
Preview
Please sign in to use this experience.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Hi everyone and happy holidays!
We've got a more extension focused release this time around, with a new C++ header, a new data model extension focusing around enabling easier JavaScript extensions, and a bunch of new samples!
Feel free to leave any questions or comments below or reach out to me on Twitter @aluhrs13. If you have feedback on our samples feel free to open a GitHub issue, or a PR if you want to contribute a fix or change.
Last month we released a C++ header, DbgModel.h, as part of the Windows SDK for extending the debugger data model via C++. You can find more information in our official docs - /en-us/windows-hardware/drivers/debugger/data-model-cpp-overview
The main page includes a great overview of how the debugger data model works and how extensions built on the new C++ header, JavaScript, NatVis, and the 'dx' command all inter-op and is work a read for anyone interested on ther internals of the debugger.
This release includes a new extension that adds some more "API style" features to the debugger data model that can be accessed through the 'dx' command, JavaScript, and the new DbgModel.h header. This extension extensions the data model to include knowledge about assembly and code execution through the Debugger.Utility.Code namespace, and the local file system through the Debugger.Utility.FileSystem namespace.
You can find the full docs for these new namespaces and the objects associated with them at:
Code
File System
The main goal of this extension is to improve the API surface available to JavaScript extensions, but all the functionality can be used via 'dx' and LINQ queries, for example:
0:000> dx Debugger.Utility.FileSystem.FileExists("C:\\Users\\aluhrs\\Desktop\\HelloWorld.txt") Debugger.Utility.FileSystem.FileExists("C:\\Users\\aluhrs\\Desktop\\HelloWorld.txt") : false
Or
0:000> dx Debugger.Utility.FileSystem.TempDirectory.Files.Count(),d Debugger.Utility.FileSystem.TempDirectory.Files.Count(),d : 110
This can be useful when writing scripts to quickly validate what a method might return in a REPL-like fashion. These extensions are also available in WinDbg and our command-line client in the latest Windows Insider SDK Preview - https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewSDK
There are a couple known issues in this release that will be fixed in our next release:
With this new API extension, we have a new sample up on our GitHub repo here - https://github.com/Microsoft/WinDbg-Samples/tree/master/SyntheticTypes.
This JavaScript extension reads basic C header files and defines synthetic type information for the structures and unions defined in the header. Through the dx command, memory can then be viewed structured as if you had a PDB with type information for those types.
Please sign in to use this experience.
Sign in