473,326 Members | 2,175 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,326 software developers and data experts.

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 2441
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: doltharz | last post by:
Please Help me i'm doing something i though was to be REALLY EASY but it drives me crazy The complete code is at the end of the email (i mean newsgroup article), i always use Option...
4
by: Wal Turner | last post by:
Consider the following simple class: public class ClassA { public static string VAR = "hello"; } public void MethodA() { while(true)
4
by: Anil Aksay | last post by:
I need to put a breakpoint when a particular memory location is written. To be more specific I want to know when 0 is written onto that memory location. Is there a way to do it in vc7? Regards,...
9
by: Greg Linwood | last post by:
I'm having difficulty understanding Session state in ASP.Net. It's almost embarrassing asking this as I've been using ASP since it was first released & it really shouldn't be this hard to use -...
6
by: Beren | last post by:
Hey, I've got some code in my Session_End which cleans up all Session related items from the Cache object. I needed to store some related sessiondata in there to be able to address it in the...
4
by: T Ralya | last post by:
I am told that ASP.NET controls the session ID and session variables, but that does not fit my symptoms. I am posting here as directed. I'm hoping that someone can at least recommend something to...
6
by: Peter | last post by:
VB6 has a wonderful debug tool: You can create a breakpoint which will break when a varible changes. This tool help me greatly. I wonder when does vb.net have Data Breakpoint? Anyone can tell me?...
5
by: Maxwell2006 | last post by:
Hi, Can I have a breakpoint that stop execution as soon as any code change the value of a specific variable? Thank you, Max
5
by: Max2006 | last post by:
Hi, I am using Visual C# 2005 and I like to setup breakpoint that pause execution upon a class variable change. Is that possible?
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.