“单步执行”突然不工作在Visual Studio [英] 'Step Into' is suddenly not working in Visual Studio

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

问题描述

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

我已经尝试了一些事情之下,但我仍然没有成功:

  • 删除我的解决方案每个项目,清晰的解决方案,重新构建解决方案的所有二进制文件。

  • 在构建解决方案项目indivdualy

  • 重新启动计算机

这是 ASP.NET C#应用程序在本地消耗了 WCF 服务队。这是在调试模式下。我有一个断点消费服务的页面上设置。断点命中,但不会步入服务code。

在ASP.NET站点和服务code是都在同一个解决方案。这一下子不工作,以前它的工作。

我怎样才能解决这个问题呢?

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

  

断点将目前尚未受到打击。无符号已加载这个文件。

我删除了所有的bin文件夹中的所有项目,并重新建立了他们一个接一个。他们都成功了,但是还是我收到的符号将不会加载的任何断点我投入任何项目的解决方案以外的ASP.NET项目中断点作品。我能之前,步调试到所有的项目,这是一个突然的事情。

从输出窗口中的信息。

 WebDev.WebServer40.EXE(管理(v4.0.30319)):加载'C:\windows\Microsoft.Net\assembly\GAC_MSIL\SMDiagnostics\v4.0_4.0.0.0__b77a5c561934e089\SMDiagnostics.dll',跳过加载符号。模块进行了优化和调试器选项仅我的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',跳过加载符号。模块进行了优化和调试器选项仅我的code已启用。
WebDev.WebServer40.EXE(管理(v4.0.30319)):加载'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Xaml.Hosting\v4.0_4.0.0.0__31bf3856ad364e35\System.Xaml.Hosting.dll',跳过加载符号。模块进行了优化和调试器选项仅我的code已启用。
WebDev.WebServer40.EXE(管理(v4.0.30319)):加载C:\ WINDOWS \ Microsoft.NET \框架\ v4.0.30319 \临时ASP.NET文件\ ROOT \ 2d49cf50 \ 14eee2cf \ App_Web_jmow15fw.dll',符号加载。
WebDev.WebServer40.EXE(管理(v4.0.30319)):加载'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll',跳过加载符号。模块进行了优化和调试器选项仅我的code已启用。
WebDev.WebServer40.EXE(管理(v4.0.30319)):加载'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.WorkflowServices\v4.0_4.0.0.0__31bf3856ad364e35\System.WorkflowServices.dll',跳过加载符号。模块进行了优化和调试器选项仅我的code已启用。
WebDev.WebServer40.EXE(管理(v4.0.30319)):加载'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Web\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll',跳过加载符号。模块进行了优化和调试器选项仅我的code已启用。
WebDev.WebServer40.EXE(管理(v4.0.30319)):加载'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Discovery\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Discovery.dll',跳过加载符号。模块进行了优化和调试器选项仅我的code已启用。
WebDev.WebServer40.EXE(管理(v4.0.30319)):加载'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll',跳过加载符号。模块进行了优化和调试器选项仅我的code已启用。
WebDev.WebServer40.EXE(管理(v4.0.30319)):加载'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Routing\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Routing.dll',跳过加载符号。模块进行了优化和调试器选项仅我的code已启用。
WebDev.WebServer40.EXE(管理(v4.0.30319)):加载'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Channels\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Channels.dll',跳过加载符号。模块进行了优化和调试器选项仅我的code已启用。
WebDev.WebServer40.EXE(管理(v4.0.30319)):加载'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.IdentityModel\v4.0_4.0.0.0__b77a5c561934e089\System.IdentityModel.dll',跳过加载符号。模块进行了优化和调试器选项仅我的code已启用。
 

解决方案

使用Visual Studio的关闭:

  • 删除解决方案的锁文件(包含调试信息,用户设置,如断点,书签,和其他用户设置。)
  • 删除Visual Studio的缓存文件(见下文)
  • 删除所有临时文件(从VS9转向VS10是VS10使用的临时文件夹)
  • 在使用Windows资源管理器中手动删除所有OBJ和bin文件夹。

打开Visual Studio和重建所有。这始终工作。请参阅<一href="http://stackoverflow.com/questions/7021116/c-sharp-vs2010-entering-break-mode-failed/7021171#7021171">C# VS2010进入休息模式失败。

有关参考:

 私人小组ClearVS9
    ClearFolder(oShell.ExpandEnvironmentStrings(%APPDATA%)及\微软\的VisualStudio \ 9.0 \ ProjectAssemblies)
    ClearFolder(oShell.ExpandEnvironmentStrings(%APPDATA%)及\微软\的VisualStudio \ 9.0 \近期)
    ClearFolder(oShell.ExpandEnvironmentStrings(%USERPROFILE%)及\本地设置\应用数据\ ApplicationHistory)
    ClearFolder(oShell.ExpandEnvironmentStrings(%USERPROFILE%)及\本地设置\应用数据\微软\的VisualStudio \ 9.0 \ ProjectAssemblies)
    ClearFolder(oShell.ExpandEnvironmentStrings(%WINDIR%)及\ Microsoft.NET \框架\ V2.0.50727 \临时ASP.NET文件)
结束小组

私人小组ClearVS10
    ClearFolder(oShell.ExpandEnvironmentStrings(%APPDATA%)及\本地\微软\ WebsiteCache)
    ClearFolder(oShell.ExpandEnvironmentStrings(%APPDATA%)及\本地\微软\ VisualStudio中\ 10.0 \ ProjectAssemblies)
结束小组
 

请参阅链接<一个href="http://briannoyes.net/2008/05/10/TheEvilSuoFileFightingAndWinningWithVisualStudio.aspx">http://briannoyes.net/2008/05/10/TheEvilSuoFileFightingAndWinningWithVisualStudio.aspx通过JMarsch提及。

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 http://briannoyes.net/2008/05/10/TheEvilSuoFileFightingAndWinningWithVisualStudio.aspx mentioned by JMarsch.

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

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