Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
379 views
in Technique[技术] by (71.8m points)

.net - 'Step Into' is suddenly not working in Visual Studio

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:windowsMicrosoft.NetassemblyGAC_MSILSMDiagnosticsv4.0_4.0.0.0__b77a5c561934e089SMDiagnostics.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:windowsMicrosoft.NetassemblyGAC_MSILSystem.Runtime.DurableInstancingv4.0_4.0.0.0__31bf3856ad364e35System.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:windowsMicrosoft.NetassemblyGAC_MSILSystem.Xaml.Hostingv4.0_4.0.0.0__31bf3856ad364e35System.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:windowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
oot2d49cf5014eee2cfApp_Web_jmow15fw.dll', Symbols loaded.
'WebDev.WebServer40.EXE' (Managed (v4.0.30319)): Loaded 'C:windowsMicrosoft.NetassemblyGAC_MSILSystem.Runtime.Serializationv4.0_4.0.0.0__b77a5c561934e089System.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:windowsMicrosoft.NetassemblyGAC_MSILSystem.WorkflowServicesv4.0_4.0.0.0__31bf3856ad364e35System.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:windowsMicrosoft.NetassemblyGAC_MSILSystem.ServiceModel.Webv4.0_4.0.0.0__31bf3856ad364e35System.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:windowsMicrosoft.NetassemblyGAC_MSILSystem.ServiceModel.Discoveryv4.0_4.0.0.0__31bf3856ad364e35System.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:windowsMicrosoft.NetassemblyGAC_MSILSystem.ServiceModel.Activitiesv4.0_4.0.0.0__31bf3856ad364e35System.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:windowsMicrosoft.NetassemblyGAC_MSILSystem.ServiceModel.Routingv4.0_4.0.0.0__31bf3856ad364e35System.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:windowsMicrosoft.NetassemblyGAC_MSILSystem.ServiceModel.Channelsv4.0_4.0.0.0__31bf3856ad364e35System.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:windowsMicrosoft.NetassemblyGAC_MSILSystem.IdentityModelv4.0_4.0.0.0__b77a5c561934e089System.IdentityModel.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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%") & "MicrosoftVisualStudio9.0ProjectAssemblies")
    ClearFolder(oShell.ExpandEnvironmentStrings("%APPDATA%") & "MicrosoftVisualStudio9.0Recent")
    ClearFolder(oShell.ExpandEnvironmentStrings("%USERPROFILE%") & "Local SettingsApplication DataApplicationHistory")
    ClearFolder(oShell.ExpandEnvironmentStrings("%USERPROFILE%") & "Local SettingsApplication DataMicrosoftVisualStudio9.0ProjectAssemblies")
    ClearFolder(oShell.ExpandEnvironmentStrings("%WINDIR%") & "Microsoft.NETFrameworkv2.0.50727Temporary ASP.NET Files")
End Sub

Private Sub ClearVS10
    ClearFolder(oShell.ExpandEnvironmentStrings("%APPDATA%") & "LocalMicrosoftWebsiteCache")
    ClearFolder(oShell.ExpandEnvironmentStrings("%APPDATA%") & "LocalMicrosoftVisualStudio10.0ProjectAssemblies")
End Sub

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...