[英]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.
当我按F5键开始调试我的Web应用程序时,它将启动该网站的默认浏览器(在本例中为IE)。 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. 在上一份工作中,我可以按F5键,调试器将自动启动,并且可以逐步执行代码,但是我似乎无法在此处完成。 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. 我尝试了很多事情,例如在web.config中添加
debug="true"
,但无济于事。
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. 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. 但是我关闭了我打开的所有其他Visual Studio解决方案,现在可以正确调试了。 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? 知道为什么会这样吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.