Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 03, 2008 09:34 PM by rickeyAtoware
Jan 02, 2008 07:08 PM|LINK
On my development machine in one solution I have 3 different web sites. When I do a response.redirect from an aspx page in web1 to another aspx page in web2, is there any way in which I can follow the code in the debug mode?
For example if I have a break point on the Response.redirect line on the page in web1, and another break point in the page load on the aspx page in web2.
In the debug mode when the code "breaks" on the break point on response.redirect on the page in web1 , at this point, if I press F11, is there anyway for the code to again "break" at the break point on the page load of the page in web2?
Jan 03, 2008 06:38 AM|LINK
Technically you can run more than one instance of VS and use second instance to attach to the second web site process.
Jan 03, 2008 02:20 PM|LINK
How? Is there a place where I can find step by step instructions?
Can you help please?
Jan 03, 2008 06:49 PM|LINK
Start vs2005, load the first website.
Start another instance of vs2005, and load the second website.
If the two sites need to communicate via http you can right click on the site, go to properties, then go the the Web tab. Here you will find a way of setting a specific port for the site to run under. Make sure both sites are on different ports before
running and make sure the configuration of each is aware of where the other one is.
Jan 03, 2008 06:55 PM|LINK
Thanks, but I need step by step instructions for to debug my app according to what Mikhail suggested.
I want to be able to step into the code of the second web site starting from the code of the first web site. Can you please guide me with instructions as to how I can do that.
Jan 03, 2008 07:08 PM|LINK
My first post assumed that both sites were running locally.
If one is running remotely, then you have a little work ahead of you. Check out:
Jan 03, 2008 07:15 PM|LINK
Both sites are running locally (you correctly assumed in your first post). Can you please explain how I can achieve debugging from one site to another.
Jan 03, 2008 07:24 PM|LINK
Have you ever debugged a website within visual studio 2005 before?
Jan 03, 2008 07:31 PM|LINK
yes, I'm using Vista and VS2005 and I'm able to debug a web site. But, how do I continue the debugging from one web site to another when a response.redirect is issued from a page on web site1 to a page on web site 2.
Thanks for helping,
Jan 03, 2008 07:54 PM|LINK
You won't be able to step into since stepping does not work across two instances of the Visual Studio, but you can step in the first instance and right before stepping into a method you are interested in, you go to the second instance of VS and set breakpoint
in the method entry point. Now, when you step in the first instance, second instance should hit the breakpoint.
I think it is also possible to attach to multiple processes in the same VS instance. Try running the application, then go to Debug | Attach to Process, locate another web instance (either WebDev server or IIS ASP.NET process (w3wp.exe or something like that)
and attach to it as managed code.