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!
With the SDK preview 14951, we have a few changes in our debugging tools that we want to call out. Feel free to leave any questions in the comments below!
You can now extend and script WinDbg with JavaScript! There is plenty of documentation on MSDN and Channel 9, so I’m not going to try to write a blog post covering everything. We'll have some follow-up blog posts over the next few months covering any FAQs.
- Defrag Tools #169 - https://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-169-Debugging-Tools-for-Windows-Team
- Defrag Tools #170 - https://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-170-Debugger-JavaScript-Scripting
- MSDN JavaScript Debugger Scripting - https://msdn.microsoft.com/library/windows/hardware/3442E2C4-4054-4698-B7FB-8FE19D26C171.aspx
- MSDN JavaScript Debugger Example Scripts - https://msdn.microsoft.com/library/windows/hardware/F477430B-10C7-4039-9C5F-25556C306643.aspx
- MSDN Native Debugger Objects in JavaScript Extensions - https://msdn.microsoft.com/library/windows/hardware/A8E12564-D083-43A7-920E-22C4D627FEE8.aspx
The functionality of the kernel mode !handle extension has been moved to the debugger data model and is now accessible, scriptable, and LINQ queryable via “Io.Handles” off any process object (e.g.: @$curprocess).
Example uses:
- Show handles in the current process: dx @$curprocess.Io.Handles
- Group handles in the current process by type: dx @$curprocess.Io.Handles.GroupBy( h=> h.Type)
- Map handle table to underlying objects: dx @$curprocess.Io.Handles.Select(h => h.Object.UnderlyingObject)
- See every open file in the process: dx @$curprocess.Io.Handles.Where(h => h.Type == "File").Select(h => h.Object.UnderlyingObject.FileName)
Basic information about the PEB and TEB has been added to the debugger data model off of and process or thread objects.
Example uses:
- Show TEB information: dx -r2 @$curthread.Environment
- Show PEB information: dx -r2 @$curprocess.Environment
- dtx - The C++ expression syntax of 'dx' is sometimes difficult to parse. We added 'dtx' to take a data type and address similar to the 'dt' command. This command doesn't have all the flags available to 'dt'.
- .excr - A lot of people mistype '.ecxr', so we added '.excr' to prevent people from having to re-type the command.
- .sympath - Changing your symbol path will now trigger a deferred (lazy) reload of the modules that are using exported symbols.
- bl - Now has DML links to disable, enable, or delete breakpoints.
We now have our own sub-category called "Debugging Tools for Windows" in the feedback hub under "Developer Tools" the developer tools category because we want to provide you an easy way to send feedback. With this in mind we want to encourage you all to let us know how we’re doing and what we can do to improve things for you!
The DLL for KD1394 is included in the kits now in the "1394" folder. This can be used to enable kernel debugging over 1394 as described in our previous blog post here.
Let us know what you think of everything in the comments!
-Andy
@aluhrs13
- Anonymous
October 28, 2016
so samilar like . my js windbg extentsion is based on charka kd> !jsJSWD (x64) V0.0.0.2 Build(Oct 12 2016 , 16:08:17)Usage: !js [Options] {ScriptFile} [Commandline] - Anonymous
January 24, 2017
Love to try this as i need help for debugging my internet provider won't touch a problem when I get a notice for the need to debug they won't help.