幻影代码 [英] Phantom code

查看:86
本文介绍了幻影代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在运行Visual Studio 2003版本1.1.4322 SP1来构建一个网页

应用程序。


今天早上一个奇怪的事情开始发生在一个我的co-

工人的开发环境。


屏幕上有一个asp:label字段lblMessage这将显示错误

消息。在CodeBehind中,我们有一个Sub执行一些

验证检查,并设置lblMessage.text的值。有几个检查有几个不同的消息,可以在文本

字段中输入几个不同的消息。这个Sub应该只在单击Save按钮时执行。


当她运行调试器时,屏幕最初会显示一条

特定消息。我们在一行代码上设置了断点,

设置了该消息,但我们从未达到断点。在Page_Init Sub的InitializeComponents命令上有一个断点

,我们可以看到

已经设置了错误消息。所以不知何故,字段

有一个值(只能在代码中设置)之前代码

甚至已经初始化。


我们在Watch1窗口中看到了lblMessage.text的值。在立即窗口中使用

,我们可以运行lblMessage.text =" " ;.看起来好像是b $ b工作,因为?lblMessage.text显示"。仍然,观察窗口

显示文本不是空白,并且值仍然显示在

屏幕上。好像我们在调试器中访问的字段是

与代码中处理的字段不同。


所以我们''检查了我们能想到的一切。在应用程序中只有一个字段

。我们甚至尝试更改该字段的

名称。我们删除了DLL和PDB,并重建了它们的b $ b。我们已经确认该项目是在调试模式下构建的。我们已经清除了所有缓存,cookie等等。我们尝试在代码中更改消息文本

,以确保它没有缓存在某个地方,但是新的

字符串会立即出现。


现在,这只发生在她的机器上。当我在我的

机器上运行相同的代码时,值为"在InitializeComponents断点处。


所以现在我们根本不相信她的调试器。代码似乎是执行不应执行的
。对于这里的想法,我们几乎不知所措。任何人都有我们的线索?


干杯

Dan

解决方案

Dude


dotnet 1.1无法在Windows 95,98,me,2000,xp,2003或vista上运行

$ b $你为什么要用2003年?


长出一些球孩子;回到vb6它无处不在,而且没有

问题


2月8日,下午1点42分,DanG < d ... @ rmci.netwrote:


我们正在运行Visual Studio 2003版本1.1.4322 SP1来构建一个网站

申请。


我今天早上在我的一个工作人员的开发环境中开始发生一些奇怪的事情。


屏幕上有一个asp:label字段" lblMessage"这将显示错误

消息。在CodeBehind中,我们有一个Sub执行一些

验证检查,并设置lblMessage.text的值。有几个检查有几个不同的消息,可以在文本

字段中输入几个不同的消息。这个Sub应该只在单击Save按钮时执行。


当她运行调试器时,屏幕最初会显示一条

特定消息。我们在一行代码上设置了断点,

设置了该消息,但我们从未达到断点。在Page_Init Sub的InitializeComponents命令上有一个断点

,我们可以看到

已经设置了错误消息。所以不知何故,字段

有一个值(只能在代码中设置)之前代码

甚至已经初始化。


我们在Watch1窗口中看到了lblMessage.text的值。在立即窗口中使用

,我们可以运行lblMessage.text =" " ;.看起来好像是b $ b工作,因为?lblMessage.text显示"。仍然,观察窗口

显示文本不是空白,并且值仍然显示在

屏幕上。好像我们在调试器中访问的字段是

与代码中处理的字段不同。


所以我们''检查了我们能想到的一切。在应用程序中只有一个字段

。我们甚至尝试更改该字段的

名称。我们删除了DLL和PDB,并重建了它们的b $ b。我们已经确认该项目是在调试模式下构建的。我们已经清除了所有缓存,cookie等等。我们尝试在代码中更改消息文本

,以确保它没有缓存在某个地方,但是新的

字符串会立即出现。


现在,这只发生在她的机器上。当我在我的

机器上运行相同的代码时,值为"在InitializeComponents断点处。


所以现在我们根本不相信她的调试器。代码似乎是执行不应执行的
。对于这里的想法,我们几乎不知所措。任何人都有我们的线索?


干杯

Dan



< BLOCKQUOTE> WTF?我在2003年和XP上运行了1.1多年。我的一半b / b
分配是将糟糕的旧vb6作业转换为网络应用程序。


而且我不是孩子。很有可能我的编程时间超过了你已经活着的b $ b。 (见过打卡?)

2月13日晚上11点28分,susie ... @ hotmail.com < susie ... @ hotmail.com>

写道:


Dude


dotnet 1.1不会在Windows 95,98,me,2000,xp,2003或vista上运行


你为什么要使用2003?


长出一些球孩子;回到vb6它无处不在,而且没有

问题


2月8日,下午1点42分,DanG < d ... @ rmci.netwrote:


我们正在运行Visual Studio 2003版本1.1.4322 SP1来构建一个网站

申请。


今天早上我的一个工作人员的开发环境开始发生一些奇怪的事情。


屏幕上有一个asp:label字段" lblMessage"这将显示错误

消息。在CodeBehind中,我们有一个Sub执行一些

验证检查,并设置lblMessage.text的值。有几个检查有几个不同的消息,可以在文本

字段中输入几个不同的消息。此Sub应仅在单击保存按钮时执行。


当她运行调试器时,屏幕最初会显示一条

特定消息。我们在一行代码上设置了断点,

设置了该消息,但我们从未达到断点。在Page_Init Sub的InitializeComponents命令上有一个断点

,我们可以看到

已经设置了错误消息。所以某种程度上,字段

有一个值(只能在代码中设置)之前代码

甚至已被初始化。


我们在Watch1窗口中看到了lblMessage.text的值。在立即窗口中使用

,我们可以运行lblMessage.text =" " ;.看起来好像是b $ b工作,因为?lblMessage.text显示"。仍然,观察窗口

显示文本不是空白,并且值仍然显示在

屏幕上。好像我们在调试器中访问的字段是

,而不是在代码中处理的字段。


所以我们已经检查了我们能想到的一切。在应用程序中只有一个字段

。我们甚至尝试更改该字段的

名称。我们删除了DLL和PDB,并重建了它们的b $ b。我们已经确认该项目是在调试模式下构建的。我们已经清除了所有缓存,cookie等等。我们尝试在代码中更改消息文本

,以确保它没有缓存在某个地方,但是新的

字符串会立即显示。


现在,这只发生在她的机器上。当我在我的

机器上运行相同的代码时,值为"在InitializeComponents断点处。


所以现在我们根本不相信她的调试器。代码似乎是执行不应执行的
。对于这里的想法,我们几乎不知所措。任何人都有我们的线索?


干杯

Dan-隐藏引用文字 -



- 显示引用的文字 -



yes;我已经在XP上看到了一张打孔卡LoL


1.1 ..你是怎么回事并在手机上安装这个框架的?b $ b人民桌面?


我觉得它很搞笑;你怎么让人们升级到DVD

驱动器才能安装你的应用程序?


它是什么;框架400 MB;你几乎得到了一点点CD / L
剩余的房间,还有b $ b和记录;它甚至不可能确定''哪个版本

的框架在机器x上''


我已经有了这台机器我的办公桌......它在圣诞节结束了

包装纸;我要把它交给我的女朋友..


请告诉我''如何判断该框架的版本是什么?

这台机器''


我觉得很奇怪,MS没有先见之明想到这样的事情。应该有一个特殊的.CPL文件来跟踪

框架或什么



2月16日上午8:23," ;当" < d ... @ rmci.netwrote:


WTF?我在2003年和XP上运行了1.1多年。我的一半b / b
分配是将糟糕的旧vb6作业转换为网络应用程序。


而且我不是孩子。很有可能我的编程时间超过了你已经活着的b $ b。 (见过打卡?)


2月13日晚上11点28分,susie ... @ hotmail.com < susie ... @ hotmail.com>

写道:


Dude


dotnet 1.1无法在Windows 95,98,me,2000,xp,2003或vista
上运行


你为什么要用2003?


增长一些球孩子;返回到vb6它无处不在

问题


2月8日,下午1:42,DanG ; < d ... @ rmci.netwrote:


我们正在运行Visual Studio 2003版本1.1。 4322 SP1构建一个web

应用程序。


今天早上我的一个人开始发生一些奇怪的事情 -

工人的发展环境。


屏幕上有一个asp:label字段" lblMessage"这将显示错误

消息。在CodeBehind中,我们有一个Sub执行一些

验证检查,并设置lblMessage.text的值。有几个检查有几个不同的消息,可以在文本

字段中输入几个不同的消息。此Sub应仅在单击保存按钮时执行。


当她运行调试器时,屏幕最初会显示一个

特定消息。我们在一行代码上设置了断点,

设置了该消息,但我们从未达到断点。在Page_Init Sub的InitializeComponents命令上有一个断点

,我们可以看到

已经设置了错误消息。所以某种程度上,字段

有一个值(只能在代码中设置)之前代码

甚至已被初始化。


我们在Watch1窗口中看到了lblMessage.text的值。在立即窗口中使用

,我们可以运行lblMessage.text =" " ;.看起来好像是b $ b工作,因为?lblMessage.text显示"。仍然,观察窗口

显示文本不是空白,并且值仍然显示在

屏幕上。好像我们在调试器中访问的字段是

,而不是在代码中处理的字段。


所以我们已经检查了我们能想到的一切。在应用程序中只有一个字段

。我们甚至尝试更改该字段的

名称。我们删除了DLL和PDB,并重建了它们的b $ b。我们已经确认该项目是在调试模式下构建的。我们已经清除了所有缓存,cookie等等。我们尝试在代码中更改消息文本

,以确保它没有缓存在某个地方,但是新的

字符串会立即显示。


现在,这只发生在她的机器上。当我在我的

机器上运行相同的代码时,值为"在InitializeComponents断点处。


所以现在我们根本不相信她的调试器。代码似乎是执行不应执行的
。对于这里的想法,我们几乎不知所措。任何人都有我们的线索?


干杯

Dan-隐藏引用文字 -


- 显示引用文字 - 隐藏引用文字 -



- 显示引用text -



We''re running Visual Studio 2003 version 1.1.4322 SP1 to build a web
application.

Something strange started happening this morning on one of my co-
workers'' Development Environments.

The screen has an asp:label field "lblMessage" that will display error
messages. Within the CodeBehind, we have a Sub that does some
validation checks, and sets the value of lblMessage.text. There are
several checks, and several different messages can be put in the text
field. This Sub should only execute when the Save button is clicked.

When she runs the debugger, the screen comes up initially with one
specific message. We''ve put a breakpoint on the ONE line of code that
sets that message, but we never hit the breakpoint. With a breakpoint
on the InitializeComponents command of the Page_Init Sub, we can see
that the error message has already been set. So somehow, the field
has a value (which can only be set within the code) BEFORE the code
has even been initialized.

We have seen the value of lblMessage.text in the Watch1 window. Using
the Immediate window, we can run lblMessage.text = " ". It appears to
work, because ?lblMessage.text shows "". Still, the watch window
shows the text is not blank, and the value still appears on the
screen. It''s as though the field we''re accessing in the debugger is
not the same one processed in the code.

So we''ve checked everything we can think of. There is only one field
with that name in the application. We have even tried changing the
name of the field. We have deleted the DLL and the PDB, and rebuilt
them. We''ve confirmed that the project is built in debug mode. We''ve
cleared all cache, cookies, etc. We tried changing the message text
in the code, to make sure it wasn''t cached somewhere, but the new
string appears immediately.

Now, this ONLY happens on her machine. When I run the same code on my
machine, the value is "" at the InitializeComponents breakpoint.

So now we don''t trust her debugger at all. Code appears to be
executing that should not be executing. We''re pretty much at a loss
for ideas here. Anyone have a clue for us?

Cheers
Dan

解决方案

Dude

dotnet 1.1 doesn''t run on windows 95, 98, me, 2000, xp, 2003 or vista

why would you use 2003?

grow some balls kid; go back to vb6 it works everywhere without a
problem

On Feb 8, 1:42 pm, "DanG" <d...@rmci.netwrote:

We''re running Visual Studio 2003 version 1.1.4322 SP1 to build a web
application.

Something strange started happening this morning on one of my co-
workers'' Development Environments.

The screen has an asp:label field "lblMessage" that will display error
messages. Within the CodeBehind, we have a Sub that does some
validation checks, and sets the value of lblMessage.text. There are
several checks, and several different messages can be put in the text
field. This Sub should only execute when the Save button is clicked.

When she runs the debugger, the screen comes up initially with one
specific message. We''ve put a breakpoint on the ONE line of code that
sets that message, but we never hit the breakpoint. With a breakpoint
on the InitializeComponents command of the Page_Init Sub, we can see
that the error message has already been set. So somehow, the field
has a value (which can only be set within the code) BEFORE the code
has even been initialized.

We have seen the value of lblMessage.text in the Watch1 window. Using
the Immediate window, we can run lblMessage.text = " ". It appears to
work, because ?lblMessage.text shows "". Still, the watch window
shows the text is not blank, and the value still appears on the
screen. It''s as though the field we''re accessing in the debugger is
not the same one processed in the code.

So we''ve checked everything we can think of. There is only one field
with that name in the application. We have even tried changing the
name of the field. We have deleted the DLL and the PDB, and rebuilt
them. We''ve confirmed that the project is built in debug mode. We''ve
cleared all cache, cookies, etc. We tried changing the message text
in the code, to make sure it wasn''t cached somewhere, but the new
string appears immediately.

Now, this ONLY happens on her machine. When I run the same code on my
machine, the value is "" at the InitializeComponents breakpoint.

So now we don''t trust her debugger at all. Code appears to be
executing that should not be executing. We''re pretty much at a loss
for ideas here. Anyone have a clue for us?

Cheers
Dan



WTF? I''ve been running 1.1 on 2003 and XP for years. Half of my
assignments are to convert crappy old vb6 jobs into web apps.

And I''m no "kid". Good chance I''ve been programming longer than
you''ve been alive. (Ever seen a punch card?)
On Feb 13, 11:28 pm, "susie...@hotmail.com" <susie...@hotmail.com>
wrote:

Dude

dotnet 1.1 doesn''t run on windows 95, 98, me, 2000, xp, 2003 or vista

why would you use 2003?

grow some balls kid; go back to vb6 it works everywhere without a
problem

On Feb 8, 1:42 pm, "DanG" <d...@rmci.netwrote:

We''re running Visual Studio 2003 version 1.1.4322 SP1 to build a web
application.

Something strange started happening this morning on one of my co-
workers'' Development Environments.

The screen has an asp:label field "lblMessage" that will display error
messages. Within the CodeBehind, we have a Sub that does some
validation checks, and sets the value of lblMessage.text. There are
several checks, and several different messages can be put in the text
field. This Sub should only execute when the Save button is clicked.

When she runs the debugger, the screen comes up initially with one
specific message. We''ve put a breakpoint on the ONE line of code that
sets that message, but we never hit the breakpoint. With a breakpoint
on the InitializeComponents command of the Page_Init Sub, we can see
that the error message has already been set. So somehow, the field
has a value (which can only be set within the code) BEFORE the code
has even been initialized.

We have seen the value of lblMessage.text in the Watch1 window. Using
the Immediate window, we can run lblMessage.text = " ". It appears to
work, because ?lblMessage.text shows "". Still, the watch window
shows the text is not blank, and the value still appears on the
screen. It''s as though the field we''re accessing in the debugger is
not the same one processed in the code.

So we''ve checked everything we can think of. There is only one field
with that name in the application. We have even tried changing the
name of the field. We have deleted the DLL and the PDB, and rebuilt
them. We''ve confirmed that the project is built in debug mode. We''ve
cleared all cache, cookies, etc. We tried changing the message text
in the code, to make sure it wasn''t cached somewhere, but the new
string appears immediately.

Now, this ONLY happens on her machine. When I run the same code on my
machine, the value is "" at the InitializeComponents breakpoint.

So now we don''t trust her debugger at all. Code appears to be
executing that should not be executing. We''re pretty much at a loss
for ideas here. Anyone have a clue for us?

Cheers
Dan- Hide quoted text -


- Show quoted text -



yes; I have seen a punch card LoL

1.1 on XP huh.. what did you run around and install the framework on
peoples'' desktops by hand?

I just find it hilarious; what do you make people upgrade to a DVD
drive in order to install your app?

what is it; 400 mb for the framework; you''ve almost got a little bit
of room left on the CD LoL

and for the record; it''s not even POSSIBLE to determine ''which version
of the framework is on machine x''

I''ve got this machine under my desk.. it''s wrapped up in Christmas
Wrapping Paper; im going to give it to my girlfriend..

please tell me ''how do I tell which version of the framework is on
this machine''

I just find it hilarious that MS didn''t have the foresight to think of
things like this; there should be a special .CPL file to keep track of
the framework or something


On Feb 16, 8:23 am, "DanG" <d...@rmci.netwrote:

WTF? I''ve been running 1.1 on 2003 and XP for years. Half of my
assignments are to convert crappy old vb6 jobs into web apps.

And I''m no "kid". Good chance I''ve been programming longer than
you''ve been alive. (Ever seen a punch card?)

On Feb 13, 11:28 pm, "susie...@hotmail.com" <susie...@hotmail.com>
wrote:

Dude

dotnet 1.1 doesn''t run on windows 95, 98, me, 2000, xp, 2003 or vista

why would you use 2003?

grow some balls kid; go back to vb6 it works everywhere without a
problem

On Feb 8, 1:42 pm, "DanG" <d...@rmci.netwrote:

We''re running Visual Studio 2003 version 1.1.4322 SP1 to build a web
application.

Something strange started happening this morning on one of my co-
workers'' Development Environments.

The screen has an asp:label field "lblMessage" that will display error
messages. Within the CodeBehind, we have a Sub that does some
validation checks, and sets the value of lblMessage.text. There are
several checks, and several different messages can be put in the text
field. This Sub should only execute when the Save button is clicked.

When she runs the debugger, the screen comes up initially with one
specific message. We''ve put a breakpoint on the ONE line of code that
sets that message, but we never hit the breakpoint. With a breakpoint
on the InitializeComponents command of the Page_Init Sub, we can see
that the error message has already been set. So somehow, the field
has a value (which can only be set within the code) BEFORE the code
has even been initialized.

We have seen the value of lblMessage.text in the Watch1 window. Using
the Immediate window, we can run lblMessage.text = " ". It appears to
work, because ?lblMessage.text shows "". Still, the watch window
shows the text is not blank, and the value still appears on the
screen. It''s as though the field we''re accessing in the debugger is
not the same one processed in the code.

So we''ve checked everything we can think of. There is only one field
with that name in the application. We have even tried changing the
name of the field. We have deleted the DLL and the PDB, and rebuilt
them. We''ve confirmed that the project is built in debug mode. We''ve
cleared all cache, cookies, etc. We tried changing the message text
in the code, to make sure it wasn''t cached somewhere, but the new
string appears immediately.

Now, this ONLY happens on her machine. When I run the same code on my
machine, the value is "" at the InitializeComponents breakpoint.

So now we don''t trust her debugger at all. Code appears to be
executing that should not be executing. We''re pretty much at a loss
for ideas here. Anyone have a clue for us?

Cheers
Dan- Hide quoted text -

- Show quoted text -- Hide quoted text -


- Show quoted text -



这篇关于幻影代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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