windows

Really powerful debugging with WinDBG & SOS.dll

If you have never used WinDBG or the SOS extensions before, read the following blog posts by Mike Taulty:

Mike walks you through a sample debugging session with WinDBG. Then in the second part, he focuses on the SOS extensions for .NET debugging. With the SOS extension you can do some seriously cool stuff:

  • View thread/threadpool info
  • View the finalizequeue
  • See what’s allocated on the managed heap
  • Determine what is keeping your managed object from being finalized by viewing it’s “roots”

If you have Visual C++ installed you can actually use SOS calls from the Visual Studio debugger! Read Mike’s post, that walks you through the setup and use of SOS from inside Visual Studio. As Mike points out, make sure you go to the project properties, choose Debug, and then check “Enabled unmanaged code debugging”. Be prepared the very first time you do this, it might be slow because the symbols have to be downloaded/loaded.

windows
tools
c#
.net

Comments (0)

Permalink

How to script changes to your TCP/IP setting in WindowsXP

Microsoft created a cool scriptable utility called netsh. that allows you to make changes to your TCP/IP settings very simply. To try it out, open a command prompt and enter the following:

netsh

You should see the prompt change to netsh>. Next, enter this command:

help

You should now see the list of all the commands you can use. Now enter:

interface

You should now see the prompt change to netsh interface>. That means you are now executing commands in this context. In each context you can type help to see what commands are available. Next type:

show interface

You should now see a list of all the network interfaces on your machine. What’s cool is you can put a statement like this into a batch file to automate setting changes:

netsh interface ip set dns name=”Wireless Network Connection” static X.X.X.X primary

Where X.X.X.X is the ip address that you want to set as the primary dns for the network connection named “Wireless Network Connection”. I have found this very helpful when used to automatically configure settings for a VPN connection.

windows

Comments (0)

Permalink