Visual Studio 立即窗口 - Web 应用程序的问题
有人有使用 Visual Studio 即时窗口与 Web 应用程序的经验吗?我有 VS2010 Ultimate,当使用 for ex 时,立即窗口按预期工作(我可以在设计模式下评估代码)。控制台应用程序。但当我尝试找前任时。在 Web 应用程序项目中调用即时窗口中的静态方法时,我收到错误“在设计模式下无法计算表达式。” 我做了一些谷歌搜索,我能找到的最佳答案是在 这个 帖子中写道:
请记住,如果您正在使用 Web 应用程序,则需要在从立即窗口进行评估之前调试您的应用程序并命中断点(只需在项目的起始页上放置一个断点)。否则,您将看到“在设计模式下无法计算表达式”。或“在运行模式下无法计算表达式。”
这是否意味着只有在我启动应用程序并命中断点时才能使用立即窗口?如果是这样,有人知道为什么 Web 应用程序会出现这种情况吗?
谢谢
Does anyone have any experience in using the Visual Studio Immediate Window with Web Applications? I have VS2010 Ultimate, and the immediate window works just as expected (i can evaluate code while in design mode), when using for ex. Console Applications. But when i try for ex. calling a static method in the immediate window while in a Web Application project, i get the error 'The expression cannot be evaluated while in design mode.' I did some googleing and the best answer i could find was in a comment on this
post, saying :
Keep in mind that if you are working with Web Applications you need to debug your app and hit a breakpoint (just place a breakpoint on your start page of the project) before evaluating from the immediate window. Otherwise you will be greeted with " The expression cannot be evaluated while in design mode." or "The expression cannot be evaluated while in run mode. "
Does this mean that the Immediate Window can only be used if I've started the application and hit a breakpoint? And if so, does anyone have any idea why this is true for web applications?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论