“Step Into”在Visual Studio中突然无法工作 [英] 'Step Into' is suddenly not working in Visual Studio

查看:232
本文介绍了“Step Into”在Visual Studio中突然无法工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

突然之间,我遇到了一个问题,我无法通过在Visual Studio中调试进入任何代码。一步一步工作正常,但它拒绝进入( F11 )我的任何代码。这是以前工作的,现在突然间没有。



我已经尝试过一些下面的内容,但我还是没有成功:




  • 删除我的解决方案中的每个项目中的所有bin文件,清理解决方案,重新构建解决方案。


  • 在解决方案中构建项目indivdualy


  • 重新启动机器




它是一个 ASP.NET C#应用程序使用 WCF 在本地服务。它处于调试模式。我在消费该服务的页面上设置了一个断点。断点命中,但它不会进入服务代码。



ASP.NET站点和服务代码都在同一个解决方案中。这一切都不起作用,以前一直工作。



我如何解决这个问题?



为服务项目添加一个断点我得到一个警告:


断点当前不会被打。没有为此文档加载任何符号。


我删除了所有项目的所有bin文件夹,并逐个重新构建。他们都成功了,但是我仍然得到符号将不会加载到任何断点上的任何断点,而不是ASP.NET项目中断点工作的解决方案之外的任何项目。我以前能够调试所有的项目,这是一个突然的事情。



输出窗口中的信息。

 'WebDev.WebServer40 .EXE'(Managed(v4.0.30319)):加载'C:\windows\Microsoft.Net\assembly\GAC_MSIL\SMDiagnostics\v4.0_4.0.0.0__b77a5c561934e089\SMDiagnostics.dll',跳过加载符号模块被优化,调试器选项Just My Code被启用。 
'WebDev.WebServer40.EXE'(托管(v4.0.30319)):加载'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.DurableInstancing\v4.0_4 .0.0.0__31bf3856ad364e35\System.Runtime.DurableInstancing.dll',跳过加载符号。模块被优化,调试器选项Just My Code被启用。
'WebDev.WebServer40.EXE'(Managed(v4.0.30319)):加载'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Xaml.Hosting\v4.0_4 .0.0.0__31bf3856ad364e35\System.Xaml.Hosting.dll',跳过加载符号。模块被优化,调试器选项Just My Code被启用。
'WebDev.WebServer40.EXE'(Managed(v4.0.30319)):加载'C:\windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root \2d49cf50\14eee2cf\App_Web_jmow15fw.dll',加载符号。
'WebDev.WebServer40.EXE'(Managed(v4.0.30319)):加载'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4 .0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll',跳过加载符号。模块被优化,调试器选项Just My Code被启用。
'WebDev.WebServer40.EXE'(Managed(v4.0.30319)):加载'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.WorkflowServices\v4.0_4.0.0 .0__31bf3856ad364e35\System.WorkflowServices.dll',跳过加载符号。模块被优化,调试器选项Just My Code被启用。
'WebDev.WebServer40.EXE'(Managed(v4.0.30319)):加载'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Web\v4.0_4 .0.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll',跳过加载符号。模块被优化,调试器选项Just My Code被启用。
'WebDev.WebServer40.EXE'(Managed(v4.0.30319)):加载'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Discovery\v4.0_4 .0.0.0__31bf3856ad364e35\System.ServiceModel.Discovery.dll',跳过加载符号。模块被优化,调试器选项Just My Code被启用。
'WebDev.WebServer40.EXE'(Managed(v4.0.30319)):Loaded'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4 .0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll',跳过加载符号。模块被优化,调试器选项Just My Code被启用。
'WebDev.WebServer40.EXE'(Managed(v4.0.30319)):加载'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Routing\v4.0_4 .0.0.0__31bf3856ad364e35\System.ServiceModel.Routing.dll',跳过加载符号。模块被优化,调试器选项Just My Code被启用。
'WebDev.WebServer40.EXE'(Managed(v4.0.30319)):加载'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Channels\v4.0_4 .0.0.0__31bf3856ad364e35\System.ServiceModel.Channels.dll',跳过加载符号。模块被优化,调试器选项Just My Code被启用。
'WebDev.WebServer40.EXE'(Managed(v4.0.30319)):加载'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.IdentityModel\v4.0_4.0.0 .0__b77a5c561934e089\System.IdentityModel.dll',跳过加载符号。模块被优化,调试器选项Just My Code被启用。


解决方案

关闭Visual Studio:




  • 删除解决方案的suo文件(包含调试信息,用户设置,如断点,书签和其他用户设置。)

  • 删除Visual Studio缓存文件(见下文)

  • 删除所有临时文件(从VS9到VS10的转换是VS10使用临时文件夹)

  • 使用Windows资源管理器手动删除所有obj和bin文件夹。



打开Visual Studio并重新构建所有对象。这总是有效。请参阅 C#VS2010进入中断模式失败



参考:

  Private Sub ClearVS9 
ClearFolder(oShell .ExpandEnvironmentStrings(%APPDATA%)&\Microsoft\VisualStudio\9.0\ProjectAssemblies)
ClearFolder(oShell.ExpandEnvironmentStrings(%APPDATA%)&\Microsoft\ VisualStudio\9.0\Recent)
ClearFolder(oShell.ExpandEnvironmentStrings(%USERPROFILE%)&\Local Settings\Application Data\ApplicationHistory)
ClearFolder(oShell.ExpandEnvironmentStrings (%USERPROFILE%)&\Local Settings\Application Data\Microsoft\VisualStudio\9.0\ProjectAssemblies)
ClearFolder(oShell.ExpandEnvironmentStrings(%WINDIR%)& \Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files)
End Sub

Private Sub ClearVS10
ClearFolder(oShell.ExpandEnvironmentStrings(%APPDATA%)& \Local\Microsoft\WebsiteCache)
ClearFolder(oShell.ExpandEnvironmentStrings(%APPDATA%)&\Local\Microsoft\VisualStudio\10.0\ProjectAssemblies)
End Sub

请参阅链接 JMarsch提到的邪恶的suo文件 - 与Visual Studio的战斗。 p>

All of a sudden, I have run into an issue where I cannot step into any code through debugging in Visual Studio. The step over works fine, but it refuses to step into (F11) any of my code. This was working before, now all of a sudden it does not.

I've tried some things below, but I still had no success:

  • Delete all bin files in every project in my solution, clean solution, re-build solution.

  • Build projects in solution indivdualy

  • Restart machine

It an ASP.NET C# application consuming a WCF sevice locally. It is in debug mode. I have a breakpoint set on the page consuming the service. The breakpoint hits, but it will not step into the service code.

The ASP.NET site and the service code is all in the same solution. This all of a sudden does not work, it did work before.

How can I fix this problem?

Adding a breakpoint to the service project I get a warning:

Breakpoint will not currently be hit. No symbols have been loaded for this document.

I deleted all the bin folders for all the projects and re-built them one by one. They all succeeded, but still I am getting the symbols won't load on any breakpoint I put into any project in the solution other than the ASP.NET project where the breakpoint works. I was able to debug step into all the projects before, this is an all of a sudden thing.

Information from the output window..

'WebDev.WebServer40.EXE' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\SMDiagnostics\v4.0_4.0.0.0__b77a5c561934e089\SMDiagnostics.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WebDev.WebServer40.EXE' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.DurableInstancing\v4.0_4.0.0.0__31bf3856ad364e35\System.Runtime.DurableInstancing.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WebDev.WebServer40.EXE' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Xaml.Hosting\v4.0_4.0.0.0__31bf3856ad364e35\System.Xaml.Hosting.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WebDev.WebServer40.EXE' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\2d49cf50\14eee2cf\App_Web_jmow15fw.dll', Symbols loaded.
'WebDev.WebServer40.EXE' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WebDev.WebServer40.EXE' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.WorkflowServices\v4.0_4.0.0.0__31bf3856ad364e35\System.WorkflowServices.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WebDev.WebServer40.EXE' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Web\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WebDev.WebServer40.EXE' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Discovery\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Discovery.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WebDev.WebServer40.EXE' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WebDev.WebServer40.EXE' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Routing\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Routing.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WebDev.WebServer40.EXE' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Channels\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Channels.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WebDev.WebServer40.EXE' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.IdentityModel\v4.0_4.0.0.0__b77a5c561934e089\System.IdentityModel.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

解决方案

With Visual Studio closed:

  • Delete the solution's suo file (contains debug information, user settings such as break points, bookmarks, and other user settings.)
  • Delete the Visual Studio cache files (see below)
  • Delete all temporary files (a shift from VS9 to VS10 is that VS10 uses the temp folder)
  • Manually delete all obj and bin folders using Windows Explorer.

Open Visual Studio and rebuild all. This always works. See C# VS2010 Entering break mode failed.

For reference:

Private Sub ClearVS9
    ClearFolder(oShell.ExpandEnvironmentStrings("%APPDATA%") & "\Microsoft\VisualStudio\9.0\ProjectAssemblies")
    ClearFolder(oShell.ExpandEnvironmentStrings("%APPDATA%") & "\Microsoft\VisualStudio\9.0\Recent")
    ClearFolder(oShell.ExpandEnvironmentStrings("%USERPROFILE%") & "\Local Settings\Application Data\ApplicationHistory")
    ClearFolder(oShell.ExpandEnvironmentStrings("%USERPROFILE%") & "\Local Settings\Application Data\Microsoft\VisualStudio\9.0\ProjectAssemblies")
    ClearFolder(oShell.ExpandEnvironmentStrings("%WINDIR%") & "\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files")
End Sub

Private Sub ClearVS10
    ClearFolder(oShell.ExpandEnvironmentStrings("%APPDATA%") & "\Local\Microsoft\WebsiteCache")
    ClearFolder(oShell.ExpandEnvironmentStrings("%APPDATA%") & "\Local\Microsoft\VisualStudio\10.0\ProjectAssemblies")
End Sub

See the link The evil suo file - fighting and winning with Visual Studio mentioned by JMarsch.

这篇关于“Step Into”在Visual Studio中突然无法工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆