Debugging Using WinDbg Preview

Small logo on windbg preview

WinDbg Preview is a brand-new version of WinDbg with more modern visuals, faster windows, a full-fledged scripting experience, built with the extensible debugger data model front and center. WinDbg Preview is using the same underlying engine as WinDbg today, so all the commands, extensions, and workflows you're used to will still work as they did before.

For the latest news, tips, and tricks from the debugger dev team, refer to the debugger tools team blog. https://blogs.msdn.microsoft.com/windbg/

Major Features of WinDbg Preview

Here's some of the most notable things that have changed or are new.

Main screen in debugger

General features

  • Easier Connection Setup and Recall - The WinDbg Preview includes the ability to recall previous session configuration information.

Screen shot of main screen in debugger

  • Easy feedback channel - Your feedback will guide the development effort going forward. For more information, see Providing Feedback

  • Dump file processor detection -Auto-detects processor architecture for easier managed debugging.

  • Performance Improvements Windows now load asynchronously and can be canceled - When you run another command, WinDbg Preview will stop the loading of your locals, watch, or other windows.

Windowing improvements

  • Disassembly Window Improvements - The disassembly window is also improved, the highlight of the current instruction remains where it is when you scroll.

    Disassembly windows in Debugger

  • Memory window improvements - The memory window has highlighting and improved scrolling.

  • Locals and watch data model visualization - The locals and watch windows are both based off of the data model that is used by the dx command. This means the locals and watch windows will benefit from any NatVis or JavaScript extensions you have loaded, and can even support full LINQ queries, just like the dx command.

  • Logs - This is a under the covers log of the WinDbg Preview internals. It can be viewed for troubleshooting or to monitor long running processes.

For more information, see WinDbg Preview - View menu.

  • Command window - Use the command window provides easy access to toggle DML and clear the debugger command window. All current debugger commands are compatible with and continue to work in WinDbg Preview.

Dark theme

Use File > Settings to enable the dark theme.

Screen shot showing dark theme

Ribbon Quick Access

Just pin the buttons you use the most and you can collapse the ribbon to save screen real estate.

Screen shot showing a ribon with pinned items

Source Window

The source window has been updated to be much more in line with modern editors.

Screen shot of scripting menu in debugger

Highlighting

The command window has two new highlighting features. Selecting any text will give a subtle highlight to any other instances of that text. You can then hit "Highlight/Un-highlight" or Ctrl+Alt+H to persist the highlighting.

Screen shot showing columns highlighted in yellow

Better keyboard navigation

Just hit Ctrl+Tab and you can easily navigate between windows with just your keyboard.

Screen shot showing ctrl tab menu

Integrated Time Travel Debugging (TTD)

If you need a TTD trace of your application, just check the "Record process with Time Travel Debugging" box when launching or attaching. WinDbgNext will set it up for TTD and open the trace when you're done recording.

Screen shot showing ctrl tab menu

For more information, see Time Travel Debugging - Overview.

Debugging App packages

Debugging your universal app or background task is now a single click.

Launch App Package Applications tab showing cal in the search box with three apps listed

For more information, see Launch App Package.

Attach to a process

The attach dialog is faster, more detailed, and is easier to use.

Attach to a process dialog

Enhanced breakpoint tracking

  • Enable/Disable breakpoints - The breakpoints window shows all your current breakpoints and provides easy access to enabling and disabling them.
  • Hit count - The breakpoint window keeps a running total of each time the breakpoint is hit.

For more information, see Breakpoints.

Enhanced data model support

  • Built in data model support - WinDbg Preview is written with built in data model support and the data model is available through out the debugger.
  • Model window - The model window gives you an expandable and browsable version of ‘dx’ and ‘dx -g’, letting you create powerful tables on-top of your NatVis, JavaScript, and LINQ queries.

For more information, see WinDbg Preview - Data model.

Screen shot of data model menu in debugger

New scripting development UI

  • Script development UI - There is now a purpose built scripting window to make developing JavaScript and NatVis scripts easier, with error highlighting and IntelliSense.

Screen shot of scripting menu in debugger

For more information, see WinDbg Preview - Scripting.

Backwards compatibility

Because the underling debugger engine is the same, all of the previous debugger commands and debugger extensions continue to work.

Providing feedback

Your feedback will help guide WinDbg's development going forward.

  • If you have feedback such as a feature that you really want to see or a bug that makes something difficult, use the Feedback Hub.

Screen shot of feedback hub showing feedback options including the add new feedback button

Videos

Watch these episodes of the Defrag Tools show to see Windbg Preview in action.

  • Defrag Tools #182 - Tim, Chad, and Andy go over the basics of WinDbg Preview and some of the features.
  • Defrag Tools #183 - Nick, Tim, and Chad use WinDbg Preview and go over a quick demo.
  • Defrag Tools #184 - Bill and Andrew walk through the scripting features in WinDbg Preview.
  • Defrag Tools #185 - James and Ivette provide and introduction to Time Travel Debugging.
  • Defrag Tools #186 - James and JCAB covers advanced Time Travel Debugging.

Next Steps

For information on what's new in the most recent release, see WinDbg Preview - What's New.

Review these topics to install and configure WinDbg Preview.

These topics describe how to get connected to the environment that you want to debug.

These topics describe some common tasks, organized by the menu tabs.