Thursday, May 18, 2006

Edit and Continue in VS 2003

I’m mainly using Visual Studio for my development, allthough I have Visual Studio 2005 installed on my computer. There are two main reasons for doing this. First and foremost, VS2003 is less resource hungry than VS2005. Allthough I can run VS2005 on my Tecra without problems, 99% percent of the time I doesn’t use any of the functionality of the newer version. Secondly, our product is done in .Net 1.1, and we dont have the time at the moment to port it.

One of the new cool features of VS2005 is Edit and Continue:

I was a bit surprised when I saw this, since I’ve been using the functionality in VS2003 for a long time. Here is how we do it:

  • Open your project in Visual Studio (2003) and hit Ctrl+Alt+P (Processes)
  • Select the aspnet_wp process and press attach. Make sure you select attach to the Common Library Runtime
  • Set a breakpoint in your code (this can of course be done before attaching to the process) and access the page from your browser.
  • When your application breaks, change something in your code and build the application again.

We use this all the time, and don’t have any problems with working this way. We’re also simultaneously debugging legacy asp-code and javascript in the browser in VS2003., which is helping us finding errors in our application and prevent bugs that we’d otherwise would spend a lot of time debugging.

No comments: