Apr 14 2008

My Experience with Visual Studio 2008 Remote Debugging

Tag: Visual StudioTyrone @ 10:16 pm

Surprisingly, it’s been quite pleasant.  I have tried Remote Debugging with VS.NET 2003, and I didn’t have much luck with it. However, last week there was a scenario where I desperately needed it and given that we have upgraded to VS 2008, I thought I should give it another try. There is two steps I had to perform to get this to work correctly:

  1. Configure your client machine using the Remote Debugger Configuration Wizard.
  2. Copy the Remote Debugger server components to the remote machine

That’s it.  Ok. I didn’t give you much here, so here is some more detail.

To run the Remote Debugger Configuration Wizard go to:

Start -> Program -> Microsoft Visual Studio 2008 -> Visual Studio Tools -> Visual Studio 2008 Remote Debugger Configuration Wizard

The wizard will begin and you will be brought to this screen:

 

 

 

 

 

 

 

 

 

This screen is basically asking if you want to run the remote debugger as a Windows Service. For me, I didn’t check the box to run as a service and it’s probably not even necessary. There is nothing much else to do but to click Next until the wizard completes. At the end it will tell you that all the necessary ports (most likely TCP) were opened and ready to connect to remote machines.

To run the server components on the remote machine, you need to copy the contents of this folder to the remote machine.

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Remote Debugger\x86

Once copied to the remote machine you will just have to run the msvsmon.exe program. The main window would look like this when it’s ready to accept incoming connections:

image

 

 

 

 

 

Play close attention to the server name listed in the entry. This is the name you will need to enter into the Qualifier field in the Debug -> Attach to Process screen inside Visual Studio when you want to begin the debugging process.

image

 

 

 

 

 

 

 

 

Remember to set your breakpoint first and attach to the process you want on the remote machine. The process you will want to debug should be listed in the Available Processes list.

One thing to watch out for is that in my setup, my username and password on my client machine and my remote machine were kept in sync. This way I don’t run into any unexpected access/permissions issues when connecting to the remote machine. I would also note that I was an Administrator on both machines so this would rule out any permission issues.

Let me know if you found this helpful. I do appreciate how the Visual Studio tools team simplified this process to it is as easy as following the 2 steps I listed above.

Until next time…

Happy coding!

kick it on DotNetKicks.com


Jan 15 2008

New Feature: Organize using statements with VS 2008

Tag: Visual StudioTyrone @ 1:21 pm

Wow!  I will be using ( no pun intended ) this feature quite often!

 

OrganizeUsings

 

I’ve seen some VS macros that currently do this in VS 2005 and I think Visual Studio IDE enhancement tools like Resharper, has this feature already baked into their product. However, in VS 2008, we get this for free, at least if you are using C#. Until next time…

 

Happy Coding!

 

kick it on DotNetKicks.com


Jan 05 2008

Ctrl-S in web.config in Visual Studio 2008 closes web.config file

Tag: Visual StudioTyrone @ 9:00 pm

Finally! Someone found a fix and root cause for this nagging bug I’ve been encountering with VS2008. You can find everything you need here. Thanks Rick! 

Until next time…

 

Happy Coding!


Nov 21 2007

VS 2008 - "Visual Studio encountered an unexpected error"

Tag: Visual StudioTyrone @ 8:23 am

Now that VS 2008 has been released to MSDN Subscribers, I went ahead like everyone else to rush to download and install it.  Not to my surprise, the install went perfectly since I didn’t install any pre-release version on my machine. I leaned my lesson last time when VS 2005 was released and all the headaches I had then. However, once installed, I was unable to use VS 2008 because it kept crashing and providing me with an error of "Visual Studio encountered an unexpected error"  when trying to interact with any part of the user interface. I couldn’t even exit from the program. I had to keep killing the process.  I’m like great, your not the only one who this error caught unexpectedly.  So, I figured a reboot would take care of it since I didn’t bother to reboot after the install. Nope, didn’t work.  I did a repair. Didn’t work. So, I did a complete uninstall, then reinstall and still didn’t work.  So, at this point I am frustrated since about 2 or 3 hrs have already passed.

I then decided to do some debugging…yes debugging…and I decided to start Visual Studio in Safe mode. You can do that by choosing:

Start, Run and enter this command     devenv /SafeMode

OR

Execute the same command from the command prompt directly.

After doing this, Visual Studio worked fine. I could use the menus, bring up dialog boxes, etc.  So, I believe that running is SafeMode doesn’t load any add-ins or custom VSIP packages, and I suspected one of these were probably causing the issue.  I was right, I use VisualSVN for accessing my Subversion source control repositories through Visual Studio. Its a great tool and even thought it $50, I find it very useful and much better than anything I could get for free.

So, I uninstall VisualSVN, version 1.2.4 (I think), and started VS 2008 and everything worked perfectly.  I then proceed to the VisualSVN web site to download the latest version, installed, and the new version and VS 2008 worked nicely.

I hope this helped somebody even if you don’t use VisualSVN, there may be some other add-in that may cause similar issues with VS 2008. Until next time…

Happy Coding!

 

 

kick it on DotNetKicks.com