This is a mirror of official site: http://jasper-net.blogspot.com/

Start Debugging with Windbg

| Friday, April 8, 2011
Hey folks, I’m a big fan of Windbg. It’s really powerful and you can do much more things than you can do with another other debugger!

In this blog post I’m going to show you different methods to start debugging with windbg.

Start by launching the process with Windbg

This is easy. If you need to debug a simple application and you have the exe path, you can launch it with Windbg either from the command line or from the UI. All you need to do is launching Windbg and clicking “Open Executable” menu item from the File menu. You can then provide executable path and arguments to the process. Once you click Open, your debugging session starts.

Start by attaching the process to Windbg

If you have a process that’s already running, you can use this option to start debugging with Windbg. This option is useful when debugging services or processes that cannot be restarted. To do so, launch the Windbg and select “Attach to a Process” menu item from the File menu. Windbg will display a list of processes that you can select any to attach it to the debugger. Once you click OK, your debugging session starts.

Start by using Gflags

This is a little bit advanced. You can use gflags.exe, a utility tool for processes, to start the process under Windbg. Here is how it works: You write the executable name to the GFLAGS under Image File tab and it displays you a bunch of options. In the below image, I launched the gflags.exe as administrator, switched to Image File tab and wrote notepad.exe as image name. When I clicked the TAB key, it displayed options associated with the notepad executable. The Debugger option should be filled to point to Windbg.exe path in your system.

7510.image_5F00_thumb_5F00_3DB93989.png

Read more: Emre's blog

Posted via email from Jasper-net

0 comments: