sevcik.tk

Avatar

sevcik [dot] tk / .net, csharp, sharepoint, visual studio, my knowledge base, my tips, etc…

5 debugging tips and tricks screencasts

5 debugging screencasts by Brian Hitney (Microsoft developer evangelist) http://structuretoobig.com/

  1. Part 1 is primarily an introduction into setting breakpoints … turns out there are number of ways to set breakpoints other than just clicking in the gutter.
    http://channel9.msdn.com/posts/dpeeast/DevNugget-Debugging-Tips-and-Tricks-Part-1/
  2. In part 2, he looks at using breakpoint modifiers – specifically, using the hit count modifier, and then the condition modifier.  The condition modifier can be incredibly powerful – while we can corrupt the state of our application pretty easily (as he will demonstrate), it starts to open a whole new world for debugging more efficiently.
    http://channel9.msdn.com/posts/dpeeast/DevNugget-Debugging-Tips-and-Tricks-Part-2/
  3. In part 3, we’ll dive a little deeper into some conditions by writing methods to help debug our application, then look at using the filter breakpoint modifier to debug multithreaded applications.  Finally, we’ll take a quick look at tracepoints.
    http://channel9.msdn.com/posts/dpeeast/DevNugget-Debugging-Tips-and-Tricks-Part-3/
  4. In part 4, we’ll look at the watch windows, the immediate window, and Make Object ID command.
    http://channel9.msdn.com/posts/dpeeast/DevNugget-Debugging-Tips-and-Tricks-Part-4/
  5. In part 5, we’ll look at how to use the set next statement while debugging. We’ll also look at setting up the .NET Reference Source Code for stepping through the .NET BCLs, followed by some exception handling tips.  Finally, we’ll take a look at using Mole (a VS visualizer) to further enhance the debugging experience.
    http://channel9.msdn.com/posts/dpeeast/DevNugget-Debugging-Tips-and-Tricks-Part-5/

Remote Debugging Across Domains

how to:
This procedure is verified and fully functional on Windows XP as CLIENT and Windows 2003 as SERVER for Visual Studio 2005 and 2008.

SERVER – remote computer/server, CLIENT – local computer with Visual Studio

  1. SERVER: create local user account with same user name and password as account under which run Visual Studio on client computer. Put this user to Local Administrator Group.
     
  2. SERVER: run "Stored User Names and Passwords" (over "Control Panel" or from command line "%windir%\system32\rundll32.exe keymgr.dll, KRShowKeyMgr") and add user from step 1. for authentificate to client


     

  3. SERVER: Download and install (or copy from client, 2005 version from C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\Remote Debugger or 2008 version from C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Remote Debugger\) "Visual Studio Remote Debugging Monitor" *
     
  4. SERVER: run "Visual Studio Remote Debugging Monitor" * under local account from step 1. use "Run as…" and fill SERVER\user name + password


     

  5. CLIENT: run "Stored User Names and Passwords" (from command line "%windir%\system32\rundll32.exe keymgr.dll, KRShowKeyMgr") and add user from step 1. for authentificate to server


     

  6. CLIENT: run Visual Studio 2005 (or 2008), in dialog "Attach to Process" fill to "Qualifier" SERVER, check "Show process from all users", pres enter

    and voila, you have successfully configured "Remote Debugging Across Domains"

      * you must use same version (2005 or 2008) of Visual Studio and Visual Studio Remote Debugging Monitor
     

tips:

  • if your Visual Studio freeze in attempt to connect to remote server, go to server to "Visual Studio Remote Debugger" to "Options" and temporarily change "Authentication Mode" to "No Authentication (native only)", after that Visual Studio unfreeze and show error cannot connect message…

download:

Visual Studio 2008 Service Pack 1 Remote Debugger

more info/sources:

http://www.wictorwilen.se/Post/How-to-get-Remote-Debugging-work-properly.aspx
http://www.patrickverbeeten.com/pages/ContentItemPage.aspx?id=9&item=67&p=true
http://msdn.microsoft.com/en-us/library/9y5b4b4f.aspx

http://blogs.msdn.com/greggm/archive/2004/10/04/237519.aspx

http://support.microsoft.com/kb/910448/en-us

,