469,628 Members | 1,049 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,628 developers. It's quick & easy.

Breakpoint on a session variable

Hi!

I'm new to .net so please don't be too hard on me if my question is
not appropriate...

In debug execution, is there a way to make an application stop when a
session variable's value changes?

Apr 17 '07 #1
4 2243
Your questions a bit unclear......

A request is for a page (unless its a web method in a webservice or an Ajax
call). The page resides within a web application - if all you want to do is
terminate the request from within that page when a value gets changed as the
page is progressed, check the value then issue a response.end. What you
cant do is monitor the session globally at the application level for a
session value to change, in effect listening to it somehow and ending the
response from anywhere other than in the page being requested. So, I think
your answer will be no, if I've understood correctly what your asking for.

Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog

<un******@hotmail.comwrote in message
news:11**********************@p77g2000hsh.googlegr oups.com...
Hi!

I'm new to .net so please don't be too hard on me if my question is
not appropriate...

In debug execution, is there a way to make an application stop when a
session variable's value changes?

Apr 17 '07 #2
hmm, trying to give a clearer example here:

let say in my page_load method i have at different places:
Session("haha")=0
..
..
..
Session("haha")=5
..
..
..
Session("haha")=2

in lots of different "if" structures

Runnning In debug, is there a way to make the debugger stop the
execution when the Session("haha") changes without explicitly putting
a breakpoint on each session("haha") lines?

I think we can do that with memory adresses. You can put a breakpoint
(a "watch" in old vax/vms terms...), a "watch point",
to tell the debugger to stop the execution when a specific memory
address value changes.
Thanks
Apr 17 '07 #3
I personally don't know of any way you can stop in your application
everytime the value of your Session variable changes. However, what
you can do is place your session variable into your watch window. This
way, while you are debugging through code, you can keep your eye on
your watch window and see when the Session variable changes.

If you don't know or don't see what your watch window is - when you're
in debug mode (I'm personally using VS 2005), just click on Debug -->
Windows --Watch. I think to get to it in VS 2003, you have to click
on the View menu. Anyways, hope that helped!

Ankit Mathur - MCAD.NET

Apr 18 '07 #4
Well yes it helped, thanks!

Apr 18 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Wal Turner | last post: by
4 posts views Thread by Anil Aksay | last post: by
9 posts views Thread by Greg Linwood | last post: by
6 posts views Thread by Beren | last post: by
4 posts views Thread by T Ralya | last post: by
5 posts views Thread by Maxwell2006 | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.