简体   繁体   中英

Automatically attach to process in Visual Studio

I have searched this site, and numerous others, looking for a solution to this problem. When I press F5 to start debugging my web app it will launch the default browser (IE in this case) with the web site. But if I want to debug the code I must goto Tools > Attach To Process.

In my previous job I was able to press F5 and the debugger would automatically start and I could step through the code, but I can't seem to do that here. To add to matters, there is someone else in the office whose also works as I would hope but he says he didn't do anything and doesn't know how to sort it.

I have tried numerous things, like adding debug="true" in the web.config but to no avail.

There must be a definitive way of achieving this, without having to resort to macros and the like.

I think it's not related to the button itself but could be the preferences you chose on startup. Go to Debug > Start Debugging on the menu. What button appears on the right of the menu?

HTH.

Ok I figured out a workaround to get it to work...Don't know why this occurs, maybe someone will be able to enlighten me.

But I closed all other Visual Studio solutions I had open and now it debugs properly. It was actually a colleague who put me onto this as he was in a similar scenario and just tried a lot of different things.

Any idea why this would be happening?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM