What is OPML?
debugging - Break on value change?
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What can I do?
• What to Read?
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Зарегистрируйся!

QAIX > .Net Development > debugging - Break on value change? 5 August 2008 15:39:24

  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Moderators:

debugging - Break on value change?

Graeme Hood 5 August 2008 15:39:24
 I'm trying to find out where and when a value in a session variable is
gettting changed. I know I can use conditional breakpoints, but then I
would need to know what line of code to insert it into.



Is there such a thing as a condition watch that will stop execution as
soon as a variable has a specified value? Using VS 2008.



TIA

This email message is intended only for the use of the named recipient.
Information contained in this email message and its attachments may be
privileged, confidential and protected from disclosure. If you are not the
intended recipient, please do not read, copy, use or disclose this
communication to others. Also please notify the sender by replying to this
message and then delete it from your system.


===================­================
This list is hosted by DevelopMentor http://www.develop.­com

View archives and manage your subscription(s) at http://discuss.deve­lop.com

Add comment
Peter Vertes 4 August 2008 14:52:04 permanent link ]
 I always wanted a feature like that in a debugger but unfortunately I don't
think the debugged that comes with Visual Studio has it. You might want to
try a debugger called Mole (
http://www.codeproj­ect.com/KB/macros/Mo­leForVisualStudioEdi­t.aspx) that
might be able to do it for you. You can also try using Trace Point instead
of Break Points in your code if Mole doesn't work out for you.

-Pete

On Mon, Aug 4, 2008 at 10:20 AM, Graeme Hood <G.Hood@iaea.org> wrote:

I'm trying to find out where and when a value in a session variable is
gettting changed. I know I can use conditional breakpoints, but then I
would need to know what line of code to insert it into.
Is there such a thing as a condition watch that will stop execution as
soon as a variable has a specified value? Using VS 2008.
TIA
This email message is intended only for the use of the named recipient.
Information contained in this email message and its attachments may be
privileged, confidential and protected from disclosure. If you are not the
intended recipient, please do not read, copy, use or disclose this
communication to others. Also please notify the sender by replying to this
message and then delete it from your system.
===================­================
This list is hosted by DevelopMentor(R) http://www.develop.­com
View archives and manage your subscription(s) at

===================­================
This list is hosted by DevelopMentor® http://www.develop.­com

View archives and manage your subscription(s) at http://discuss.deve­lop.com

Add comment
Mike Andrews 4 August 2008 19:12:27 permanent link ]
 This was a well loved feature by me in VB4, 5, and 6.
Recently I needed this feature as well just to know when a value had changed
regardless of the line on which it occurred but alas, the VS debugger has no
such feature. I really hope they implement this feature in a coming
version.


On Mon, Aug 4, 2008 at 9:20 AM, Graeme Hood <G.Hood@iaea.org> wrote:

I'm trying to find out where and when a value in a session variable is
gettting changed. I know I can use conditional breakpoints, but then I
would need to know what line of code to insert it into.
Is there such a thing as a condition watch that will stop execution as
soon as a variable has a specified value? Using VS 2008.
TIA
This email message is intended only for the use of the named recipient.
Information contained in this email message and its attachments may be
privileged, confidential and protected from disclosure. If you are not the
intended recipient, please do not read, copy, use or disclose this
communication to others. Also please notify the sender by replying to this
message and then delete it from your system.
===================­================
This list is hosted by DevelopMentor(R) http://www.develop.­com
View archives and manage your subscription(s) at

===================­================
This list is hosted by DevelopMentor® http://www.develop.­com

View archives and manage your subscription(s) at http://discuss.deve­lop.com

Add comment
Chris Anderson 4 August 2008 19:15:04 permanent link ]
 Move access to the variable into a property get/set accessor (which will actually result in your code reading better anyway)

Then put a breakpoint in the setter function (perhaps with a condition on the new value being differernt to the current one)


___________________­_____________

From: Discussion of building .NET applications targeted for the Web on behalf of Graeme Hood
Sent: Mon 04/08/2008 15:30
To: DOTNET-WEB@DISCUSS.­DEVELOP.COM
Subject: [DOTNET-WEB] debugging - Break on value change?



I'm trying to find out where and when a value in a session variable is
gettting changed. I know I can use conditional breakpoints, but then I
would need to know what line of code to insert it into.



Is there such a thing as a condition watch that will stop execution as
soon as a variable has a specified value? Using VS 2008.






===================­================
This list is hosted by DevelopMentor® http://www.develop.­com

View archives and manage your subscription(s) at http://discuss.deve­lop.com

Add comment
Graeme Hood 4 August 2008 19:15:49 permanent link ]
 Thanks for the tips - Mole looks pretty amazing, and I didn't know about
tracepoints, but both still mean I have to know where my session
contents are being changed in order to set a breakpoint. I need
something that just sits on top and watches for a specific value change
as I run the app.

-----Original Message-----
From: Discussion of building .NET applications targeted for the Web
[mailto:D­OTNET-WEB@DISCUSS.DEVELOP.COM] On Behalf Of Peter Vertes
Sent: Monday, 04 August 2008 16:38
To: DOTNET-WEB@DISCUSS.­DEVELOP.COM
Subject: Re: [DOTNET-WEB] debugging - Break on value change?

I always wanted a feature like that in a debugger but unfortunately I
don't
think the debugged that comes with Visual Studio has it. You might want
to
try a debugger called Mole (
http://www.codeproj­ect.com/KB/macros/Mo­leForVisualStudioEdi­t.aspx) that
might be able to do it for you. You can also try using Trace Point
instead
of Break Points in your code if Mole doesn't work out for you.

-Pete

On Mon, Aug 4, 2008 at 10:20 AM, Graeme Hood <G.Hood@iaea.org> wrote:

I'm trying to find out where and when a value in a session variable is
gettting changed. I know I can use conditional breakpoints, but then I
would need to know what line of code to insert it into.
Is there such a thing as a condition watch that will stop execution as
soon as a variable has a specified value? Using VS 2008.
TIA
This email message is intended only for the use of the named
recipient.
Information contained in this email message and its attachments may be
privileged, confidential and protected from disclosure. If you are not
the
intended recipient, please do not read, copy, use or disclose this
communication to others. Also please notify the sender by replying to
this
message and then delete it from your system.
===================­================
This list is hosted by DevelopMentor(R) http://www.develop.­com
View archives and manage your subscription(s) at

===================­================
This list is hosted by DevelopMentor(r) http://www.develop.­com

View archives and manage your subscription(s) at
http://discuss.deve­lop.com

===================­================
This list is hosted by DevelopMentor http://www.develop.­com

View archives and manage your subscription(s) at http://discuss.deve­lop.com

Add comment
Graeme Hood 5 August 2008 11:27:10 permanent link ]
 It's actually a collection that is stored in the session at application
startup in global.asax and from then on only accessed from the session
variable. I see nowhere in the code that the session is written to after
global.asax, yet on a page load event after a sequence of events, the
collection has changed.

Guess I need to understand how session works more. Anyone got a good
explanatory link?


-----Original Message-----
From: Discussion of building .NET applications targeted for the Web
[mailto:D­OTNET-WEB@DISCUSS.DEVELOP.COM] On Behalf Of Chris Anderson
Sent: Monday, 04 August 2008 17:15
To: DOTNET-WEB@DISCUSS.­DEVELOP.COM
Subject: Re: [DOTNET-WEB] debugging - Break on value change?

Move access to the variable into a property get/set accessor (which will
actually result in your code reading better anyway)

Then put a breakpoint in the setter function (perhaps with a condition
on the new value being differernt to the current one)


___________________­_____________

From: Discussion of building .NET applications targeted for the Web on
behalf of Graeme Hood
Sent: Mon 04/08/2008 15:30
To: DOTNET-WEB@DISCUSS.­DEVELOP.COM
Subject: [DOTNET-WEB] debugging - Break on value change?



I'm trying to find out where and when a value in a session variable is
gettting changed. I know I can use conditional breakpoints, but then I
would need to know what line of code to insert it into.



Is there such a thing as a condition watch that will stop execution as
soon as a variable has a specified value? Using VS 2008.






===================­================
This list is hosted by DevelopMentor(r) http://www.develop.­com

View archives and manage your subscription(s) at
http://discuss.deve­lop.com

This email message is intended only for the use of the named recipient.
Information contained in this email message and its attachments may be
privileged, confidential and protected from disclosure. If you are not the
intended recipient, please do not read, copy, use or disclose this
communication to others. Also please notify the sender by replying to this
message and then delete it from your system.

===================­================
This list is hosted by DevelopMentor http://www.develop.­com

View archives and manage your subscription(s) at http://discuss.deve­lop.com

Add comment
Chris Anderson 5 August 2008 15:39:24 permanent link ]
 That sounds like the session is storing a reference to the collection - but there's other code that also has a reference to the same collection, changing it via that reference.

I would track where references are obtained from the session, and examine those objects instead.

The reference the session hasn't changed - the object it points to has.

i.e. (pseudo-code)
theCollection = Session["theCollection"];
(later)
theCollection.Add(n­ew Thing());
- The collection that the session refers to was only read once - and yet has been changed



___________________­_____________

From: Discussion of building .NET applications targeted for the Web on behalf of Graeme Hood
Sent: Tue 05/08/2008 08:45
To: DOTNET-WEB@DISCUSS.­DEVELOP.COM
Subject: Re: [DOTNET-WEB] debugging - Break on value change?



It's actually a collection that is stored in the session at application
startup in global.asax and from then on only accessed from the session
variable. I see nowhere in the code that the session is written to after
global.asax, yet on a page load event after a sequence of events, the
collection has changed.

Guess I need to understand how session works more. Anyone got a good
explanatory link?


-----Original Message-----
From: Discussion of building .NET applications targeted for the Web
[mailto:D­OTNET-WEB@DISCUSS.DEVELOP.COM] On Behalf Of Chris Anderson
Sent: Monday, 04 August 2008 17:15
To: DOTNET-WEB@DISCUSS.­DEVELOP.COM
Subject: Re: [DOTNET-WEB] debugging - Break on value change?

Move access to the variable into a property get/set accessor (which will
actually result in your code reading better anyway)

Then put a breakpoint in the setter function (perhaps with a condition
on the new value being differernt to the current one)





===================­================
This list is hosted by DevelopMentor® http://www.develop.­com

View archives and manage your subscription(s) at http://discuss.deve­lop.com

Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или УК РФ.


QAIX > .Net Development > debugging - Break on value change? 5 August 2008 15:39:24

see also:
Re: Filter is working
JBOD array and dodgy partition
repair install with XP SP2
пройди тесты:
see also:
Blackfriday&Cybermonday Software…
The Top 10 Christmas Gifts
How to rip dvd in fast way

  Copyright © 2001—2008 QAIX
Idea: Miсhael Monashev
Помощь и задать вопросы можно в сообществе support.qaix.com.
Сообщения об ошибках оставляем в сообществе bugs.qaix.com.
Предложения и комментарии пишем в сообществе suggest.qaix.com.
Информация для родителей.
Write us at:
If you would like to report an abuse of our service, such as a spam message, please .