Visual Studio Development Bookmark and Share   
 index > Visual Studio Debugger > Debugger appears to optimize my code before debugging
 

Debugger appears to optimize my code before debugging

I've spent hours trying to get rid of the following problem in VS 2005

I have a web project that refuses to debug properly. It appears that the code is optimised when I step through it. Certain functions cannot be stepped into, etc..

I normally start debugging by pressing F5.

I've been developing for several years in Visual Studio. My other projects debug perfectly well. Just not this one. Its starting to cost me serious time as I need the debugger to work out some tricky bits in a new version of this deliverable...

My project file is below, if that can help.
========

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "C:\MGT\", "..\MGT", "{1FA47EDD-3C72-4C0D-B0AF-2A904D54CB04}"
ProjectSection(WebsiteProperties) = preProject
Debug.AspNetCompiler.VirtualPath = "/MGT"
Debug.AspNetCompiler.PhysicalPath = "..\MGT\"
Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\MGT\"
Debug.AspNetCompiler.Updateable = "true"
Debug.AspNetCompiler.ForceOverwrite = "true"
Debug.AspNetCompiler.FixedNames = "false"
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.VirtualPath = "/MGT"
Release.AspNetCompiler.PhysicalPath = "..\MGT\"
Release.AspNetCompiler.TargetPath = "PrecompiledWeb\MGT\"
Release.AspNetCompiler.Updateable = "true"
Release.AspNetCompiler.ForceOverwrite = "true"
Release.AspNetCompiler.FixedNames = "false"
Release.AspNetCompiler.Debug = "False"
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|.NET = Debug|.NET
Release|.NET = Release|.NET
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1FA47EDD-3C72-4C0D-B0AF-2A904D54CB04}.Debug|.NET.ActiveCfg = Debug|.NET
{1FA47EDD-3C72-4C0D-B0AF-2A904D54CB04}.Debug|.NET.Build.0 = Debug|.NET
{1FA47EDD-3C72-4C0D-B0AF-2A904D54CB04}.Release|.NET.ActiveCfg = Debug|.NET
{1FA47EDD-3C72-4C0D-B0AF-2A904D54CB04}.Release|.NET.Build.0 = Debug|.NET
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Gord Funk  Thursday, September 18, 2008 10:59 PM
Hi, Gord Funk

We need more detail information:

what message it pops upwhen the project refuses to debug?

when you can not stepped in,are there any warnings or errors pops up?

a screenshot or the code thatcauses this issue is also good.


Thanks,
Roahn
Roahn Luo  Friday, September 26, 2008 7:09 AM
Thanks for the reply

Sorry I didn't get back sooner - I signed up for emailed replies and your reply didn't email to me... grrr.

Perhaps I need to explain a bit better. I can get the debugger going, and it works just fine. The problem is when I want to view the variables in the watch window or elsewhere, I get a message saying that the code is optimised and can't be displayed.

I've blogged it here with a few pics...here.

Hope this provides more information.
Gord Funk  Monday, October 20, 2008 12:08 AM

You can use google to search for other answers

Custom Search

More Threads

• Program needs to crash with no JIT windows popping up
• Watch window: expand all
• Debug a Release configuration at Runtime
• Debug Remoto Visual Studio 2005
• attaching VS-debugger to Remote process (across internet)
• MSXML SP1 Symbols Not Found
• Problem Debugging SQL Server Stored Procedures in Web Application
• disable asp.net development server
• Hot code replace?
• Program can run correctly under debug model but "unhandle exception" when running in cmd