Debugging Beyond Visual Studio – WinDbg

來源:互聯網
上載者:User

標籤:sam   studio   doc   msdn   debug   tween   com   cal   help   

Getting started with WinDbg:

1. Download the Debugging Tools for Windows from the Microsoft website

We recommend you install WinDbg Preview as it offers more modern visuals, faster windows, a full-fledged scripting experience, built with extensible debugger data model front and center.

2. When clicking Download from the Microsoft Store, a prompt will appear, select “Get”

3. Windows will start the download and installation process. A prompt will confirm installation status.

4. Select to “Pin to Start,” close windows by clicking “X” on the top right of Window.

5. Set the Windows Symbol Server path in File > Settings > Symbol path (see example below)

6. Go to your Start menu, select the WinDbg Preview to launch the application

7. The WinDbg initial view

 

8. What is the difference between User Mode-Debugging and Kernel-Mode Debugging?

In User mode debugging, the code normally delegates to the system API’s to access hardware or memory. You typically are debugging a single executable, which is separated from other executables by the OS. Typical scenario is to isolate memory or application hang issues on Win32 desktop applications. In User mode, the debugger is running on the same system as the code being debugged.

In Kernel mode debugging, the code normally has unrestricted access to the hardware. Typical scenario is driver code developed for hardware devices. When debugging in Kernel mode you typically use two different systems. One system runs the code that is being debugged, and another runs the debugger, usually connected with a cable. Click here for additional information on Kernel mode debugging.

 

9. Advantages of WinDbg:

  • Extensive numbers of commands and extensions.
  • A useful tool to help understand OS and software running on the system being debugged.
  • Lightweight and can be used in production as it has no dependency, only require an executable (.exe) to run.
  • A useful tool to help isolate User or Kernel mode code that‘s difficult to troubleshoot on Windows.

 

10. Common User mode debugging commands:

.hh (Open WinDbg’s help)

 

 

 

 

 

 

Vertaget (Get the version of the target computer)

 

 

 

 

 

 

 

Symbol Path (Display or set symbol search path)

 

Version (Dump version info of debugger and loaded extension DLLs)

 

!ext.help(General extensions)

!analyze -v (Display information about the current exception or bug check; verbose)

 

 

 

 

11. Common Kernel mode debugging commands:

!analyze

 

 

 

 

 

 

!error (plus error code, e.g. “!error c0000005)

 

 

 

 

 

 

12. Useful links:

Debugging Using WinDbg Preview:

https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/debugging-using-windbg-preview

Getting Started with WinDbg Microsoft Docs:

https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/getting-started-with-windbg

 

Common WinDbg Commands:

http://windbg.info/doc/1-common-cmds.html

 

Elementary User-Mode Debugging:

https://microsoft.sharepoint.com/teams/bidpwiki/Pages1/Elementary%20User-Mode%20Debug.aspx

Debugging Beyond Visual Studio – WinDbg

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.