473,394 Members | 1,960 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

VS 2005 Web Application Debug Problems

AG
Hi all,

New install of VS 2005 Pro (SP1) on new machine with Windows XP Pro SP2,
Core 2 Extreme Quad Core processor, 4GB RAM.

Trying to debug a Web Application Project.
I had no problems debugging this same project on my old machine (also
Windows XP SP2), but having problems on the new one.

Initially, when trying to run in debug mode, I got the message
"The following module was built either with optimizations enabled or without
debug information:
C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temp ory ASP.NET
Files\...\myprojectname.dll'
To debug this module, change its project build configuration to Debug mode.
To supress this message, disable 'Warn if no usercode on launch' debugger
option."
The project is already set to debug mode.

I found a post indicating that 'Enable Just My Code' should be unchecked in
debugging options.

Unchecking it allowed me to start debugging.
However, any properties for any server control or object can not be
evaluated in the immediate or locals windows.
The message is -
'Cannot evaluate expression because the code of the current method is
optimized.'.

Can anyone offer a suggestion on how to get full debugging to work?

TIA

AG
Email: discuss at adhdata dot com


Jul 14 '07 #1
11 1836
Hi AG,

From your description, currently when you try debugging an ASP.NET 2.0 Web
application project, you found that the class properties can not be
evaluated in the immedate window and give you the following error,right?

'Cannot evaluate expression because the code of the current method is
optimized.'.

Regarding on this issue, I'd like to confirm the following things:

** whether the problem only occurs on web application project, is it also
occuring through default web site project?

** If this is a common problem occurs in each WAP project and what happen
if you create a very simple WAP project?

If the problem can be repro through a simple typical project, you can send
it to me and let me perform some local tests.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 16 '07 #2
AG
Steven,

Thanks for the reply.

I tried a few things.

Simple website project - ok.
Larger website project copied from old machine (using IIS) - ok.

Simple WAP (development server) - ok.
Simple WAP (IIS) - ok.

Larger WAP copied from old machine (IIS) - 'Cannot evaluate expression
because the code of the current method is
optimized.'

Switch same WAP to development server and it is ok.
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:Ux****************@TK2MSFTNGHUB02.phx.gbl...
Hi AG,

From your description, currently when you try debugging an ASP.NET 2.0 Web
application project, you found that the class properties can not be
evaluated in the immedate window and give you the following error,right?

'Cannot evaluate expression because the code of the current method is
optimized.'.

Regarding on this issue, I'd like to confirm the following things:

** whether the problem only occurs on web application project, is it also
occuring through default web site project?

** If this is a common problem occurs in each WAP project and what happen
if you create a very simple WAP project?

If the problem can be repro through a simple typical project, you can send
it to me and let me perform some local tests.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.

Jul 16 '07 #3
Thanks for your reply AG,

So the problem mainly occur in a complex ASP.NET 2.0 WAP hosted in IIS. As
you said that the same application can be debugged correctly in development
server(WebDev.WebServer.exe), I'm wondering how do you move the WAP into
IIS host? Directly copy the website folder ,configure it as IIS application
virtual dir and use VS 2005 to open it? Have you checked the bin dir to see
whether the PDB files are there.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 18 '07 #4
AG
Steven,

Yes, I copied the files and configured IIS app as you said.
Yes, pdb files are there.

I can access my own code values, etc..
It is system objects like httpcontext, server controls, etc that I can't
access properties/values.

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:dC**************@TK2MSFTNGHUB02.phx.gbl...
Thanks for your reply AG,

So the problem mainly occur in a complex ASP.NET 2.0 WAP hosted in IIS. As
you said that the same application can be debugged correctly in
development
server(WebDev.WebServer.exe), I'm wondering how do you move the WAP into
IIS host? Directly copy the website folder ,configure it as IIS
application
virtual dir and use VS 2005 to open it? Have you checked the bin dir to
see
whether the PDB files are there.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.

Jul 18 '07 #5
Thanks for your reply AG,

For the problem, currently I haven't any definite clues and I'll have to
perform some local test to dig further on this. Is it possible that you
create a simplified project and sent to me so that I can test it locally?
Also, based on the nature of this issue, it may require complex
troubleshooting process and maybe hard to resolve thoroughly in newsgroup.
But we'll try best to help you on this.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 20 '07 #6
AG
Steven,
A new project debugs ok, so I can't send you a small one that does not.

However, I did create a brand new web app project with a new name and import
all my files from the old one.

In that case, debugging works as expected.

As a further test, I copied the project file from the new project, renamed
it and replaced the project file in the original project.

Debugging now works as expected in the original project, so the problem does
seem to be in the project file.

While I am now able to debug, I would like to know what the cause of the
problem was, so I sent you an email with the project (proj) files attached.
Hopefully, you can find something.
--

AG
Email: discuss at adhdata dot com

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:xK**************@TK2MSFTNGHUB02.phx.gbl...
Thanks for your reply AG,

For the problem, currently I haven't any definite clues and I'll have to
perform some local test to dig further on this. Is it possible that you
create a simplified project and sent to me so that I can test it locally?
Also, based on the nature of this issue, it may require complex
troubleshooting process and maybe hard to resolve thoroughly in newsgroup.
But we'll try best to help you on this.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.

Jul 23 '07 #7
Hi AG,

Since Steven is not in office for several days, I will work with you
instead. Would you please forward the mail to me? Thanks.
Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 23 '07 #8
AG
I just sent it. My email to Steven bounced back anyway.

--

AG
Email: discuss at adhdata dot com
"Walter Wang [MSFT]" <wa****@online.microsoft.comwrote in message
news:Wy**************@TK2MSFTNGHUB02.phx.gbl...
Hi AG,

Since Steven is not in office for several days, I will work with you
instead. Would you please forward the mail to me? Thanks.
Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no
rights.

Jul 23 '07 #9
Hi AG,

Thanks for the file.

I noticed that the ".._Cant_Debug.vbproj" has "Enable optimizations" turned
on. You can see this by: "My Project" -tab "Compile" -button "Advanced
Compile Options..."
#Advanced Compiler Settings Dialog Box (Visual Basic)
http://msdn2.microsoft.com/en-us/lib...z2(VS.80).aspx
By the way, the "Generate debug info" is set to "pdb-only", although this
should be fine for debugging from IDE, but it displays assembly-language
code only when the running program is attached to the debugger.

#/debug (Visual Basic)
http://msdn2.microsoft.com/en-us/lib...86(VS.80).aspx
Hope this helps.
Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 24 '07 #10
I forgot to mention that the "Define DEBUG constant" should also be checked.
Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 24 '07 #11
AG
Walter,

That worked.
The strange thing is that on my old machine, I was able to fully debug with
'Enable Optimizations' turned on. I even tried it again to confirm.

Anyway, thanks. Problem solved.

--

AG
Email: discuss at adhdata dot com
"Walter Wang [MSFT]" <wa****@online.microsoft.comwrote in message
news:OW**************@TK2MSFTNGHUB02.phx.gbl...
Hi AG,

Thanks for the file.

I noticed that the ".._Cant_Debug.vbproj" has "Enable optimizations"
turned
on. You can see this by: "My Project" -tab "Compile" -button "Advanced
Compile Options..."
#Advanced Compiler Settings Dialog Box (Visual Basic)
http://msdn2.microsoft.com/en-us/lib...z2(VS.80).aspx
By the way, the "Generate debug info" is set to "pdb-only", although this
should be fine for debugging from IDE, but it displays assembly-language
code only when the running program is attached to the debugger.

#/debug (Visual Basic)
http://msdn2.microsoft.com/en-us/lib...86(VS.80).aspx
Hope this helps.
Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no
rights.

Jul 24 '07 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: gerd | last post by:
Hello, I want to port an MFC Application from Visual Studio 6 MFC application to Visual C++ 2005 express edition beta. While building i get following error: ------ Build started: Project:...
8
by: | last post by:
I'm starting up the development server myself and using the "Startup Url" property of the web project. The problem is i cannot debug. The debug symbols are never loaded. I realize they are under...
1
by: rwaddell | last post by:
I'm using Visual Studio 2005 Pro final, and I've noticed some bizarre behaviour when I'm debugging programs with multiple threads. Specifically, if I set a breakpoint in one of my non-UI threads,...
2
by: Ray Cassick \(Home\) | last post by:
Since I got such good feedback from the Xml comments question I will ask this of the group as well. Is VS.NET 2005 handling the visual inheritance problems centered around controls and forms...
23
by: deathtospam | last post by:
A day or two ago, I wrote a quick ASPX page with a CS codebehind using Visual Studio .NET 2005 -- it worked, I saved it and closed the project. Today, I came back to the project, reopened the...
2
by: asterixgallier | last post by:
Hello i'm having problems with log4cxx when using inside an MFC application build with visual studio 2005. The Application starts and works normaly, but while exiting, inside the DEBUG window of...
7
by: Jeroen | last post by:
We converted our decently large (13 projects, compiled about 12 mb) VStudio 2003/.Net1.1 project to VStudio 2005/.Net2. My two colleagues have no problem starting the new solution, but I get an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.