VS 2005 Web应用程序调试问题 [英] VS 2005 Web Application Debug Problems

查看:65
本文介绍了VS 2005 Web应用程序调试问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


在使用Windows XP Pro SP2的新机器上安装VS 2005 Pro(SP1),
Core 2 Extreme四核处理器,4GB内存。


尝试调试Web应用程序项目。

我在旧机器上调试同一项目没有任何问题(也是

Windows XP SP2),但新版本有问题。


最初,当我尝试在调试模式下运行时,我收到了消息

"以下模块是在启用优化或没有

调试信息的情况下构建的:

C:\ Windows \ Microsoftoft.NET\Framework\v2。 0.50727 \Temp ory ASP.NET

Files \ ... \myprojectname.dll''

要调试此模块,请将其项目构建配置更改为调试模式。

要禁止显示此消息,请禁用''如果启动时没有用户代码警告''调试器

选项。"

项目已经设置为调试模式。


我发现一个帖子表明''启用Just My Code''应该在

调试选项中取消选中。


取消选中它可以让我开始调试。

但是,任何服务器控件或对象的任何属性都不能在直接或本地窗口中进行评估。

消息是 -

''无法计算表达式,因为当前方法的代码是优化的'b $ b。''。


任何人都可以提供建议如何完全调试工作?


TIA


AG

电子邮件:讨论在adhdata dot com


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


推荐答案

您好AG,


从你的描述,当前你的时候尝试调试一个ASP.NET 2.0 Web

应用程序项目,你发现类属性不能在immedate窗口中进行评估,并给你以下错误,对吧?


''不能ev aluate表达式,因为当前方法的代码是优化的。$。'


关于这个问题,我想确认以下内容:


**问题是否仅发生在Web应用程序项目中,是否还通过默认网站项目发生了


**如果这是每个WAP项目中出现的常见问题,那么如果你创建一个非常简单的WAP项目会发生什么?



如果问题可以通过一个简单的典型项目重现,你可以发送给我,然后让我进行一些本地测试。


此致,


Steven Cheng


Microsoft MSDN在线支持主管


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


通过电子邮件收到我的帖子通知?请参阅
http://msdn.microsoft .com / subscripti ... ult.aspx#notif

ications。


注意:MSDN托管新闻组支持服务是针对非紧急问题

如果社区或微软支持人员在1个工作日内做出初步回复是可以接受的。请注意,每个跟随

的响应可能需要大约2个工作日作为支持

专业人士与您合作可能需要进一步调查才能达到

最有效的分辨率。该产品不适用于需要紧急,实时或基于电话的交互或复杂的b $ b项目分析和转储分析问题的情况。这种性质的问题最好通过联系

Microsoft客户支持服务(CSS)处理
href =http://msdn.microsoft.com/subscriptions/support/default.aspx\"target =_ blank> http://msdn.microsoft.com/subscripti...t/default.aspx


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

此帖子按原样提供。没有保证,也没有授予任何权利。

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.


Steven,


感谢您的回复。


我尝试了一些东西。


简单的网站项目 - 好的。

从旧机器复制的大型网站项目(使用IIS) - 好的。


简单的WAP(开发服务器) - 好的。

简单的WAP(IIS) - 好的。


从旧机器(IIS)复制的较大WAP - ''无法评估表达式

,因为当前方法的代码是优化的b / b $。''


将相同的WAP切换到开发服务器即可。

" Steven Cheng [MSFT]" < st ***** @ online.microsoft.com写信息

新闻:Ux **************** @ TK2MSFTNGHUB02.phx.gbl。 ..
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...

您好AG,


从您的描述中,当前您尝试调试ASP.NET 2.0 Web时/>
应用程序项目,你发现类属性不能在immedate窗口中评估
并给你以下错误,对吧?


''无法计算表达式,因为当前方法的代码是优化的。$。'


关于这个问题,我想要确认以下事项:


**问题是否仅发生在Web应用程序项目中,是否还会通过默认网站项目发生



**如果这是每个WAP项目中出现的常见问题,那么如果你创建一个非常简单的WAP项目会发生什么?


如果问题可以通过简单的典型项目重现,哟你可以给我发送

吧,让我进行一些本地测试。


真诚的,


Steven Cheng


Microsoft MSDN在线支持主管


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

通过电子邮件收到我的帖子通知?请参阅
http://msdn.microsoft .com / subscripti ... ult.aspx#notif

ications。


注意:MSDN托管新闻组支持服务是针对非紧急问题

如果社区或微软支持人员在1个工作日内做出初步回复是可以接受的。请注意,每个跟随

的响应可能需要大约2个工作日作为支持

专业人士与您合作可能需要进一步调查才能达到

最有效的分辨率。该产品不适用于需要紧急,实时或基于电话的交互或复杂的b $ b项目分析和转储分析问题的情况。这种性质的问题最好通过联系

Microsoft客户支持服务(CSS)处理
href =http://msdn.microsoft.com/subscriptions/support/default.aspx\"target =_ blank> http://msdn.microsoft.com/subscripti...t/default.aspx


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


此帖子按原样提供。没有保证,并且不授予

权利。
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.



感谢您的回复AG,


所以问题主要发生在IIS中托管的复杂ASP.NET 2.0 WAP中。作为

你说同样的应用程序可以在开发中正确调试

服务器(WebDev.WebServer.exe),我想知道如何将WAP移动到

IIS主机?直接复制网站文件夹,将其配置为IIS应用程序

虚拟目录并使用VS 2005打开它?您是否检查了bin目录,看看

是否有PDB文件。


此致,


史蒂文Cheng


Microsoft MSDN在线支持主管

此帖子是按现状提供的。没有保证,也没有授予任何权利。

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.


这篇关于VS 2005 Web应用程序调试问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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