472,356 Members | 1,964 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,356 software developers and data experts.

Debugging / Single Step into event procedures

under ASP.NET, single stepping in debug mode appears not
to stop within event procedures. i.e. 1) Create web page
with submit button and event procedure for the click
event in the code behind page, 2) Breakpoint in the
Page_Load, 3) debug the web page and click the submit
button, 4) "step into" under debug several times, 5) The
debugger does not stop at any of the statements in the
click event handler. A breakpoint is needed in each
event routine that you wish to single step through,
rather than the debugger simply stopping at each line of
your code (this was the behavior in VS 6.0 and in VB 6.0)

Anyone know how to get this to work? Seems to me to be a
significant flaw in the debugging capabilities.

Nov 17 '05 #1
3 3525
Hello,

I tested it on my side and it works fine for me. If we want the debugger stop in the OnClick event handle of that button, we need
to set breakpoint at one line of this function.

Beside, please make sure that you have set the Enable ASP.NET debugging property to True in project's properties page.

Thanks.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!Content-Class: urn:content-classes:message
!From: "R Millman" <RM******@AllscriptsOL.com>
!Sender: "R Millman" <RM******@AllscriptsOL.com>
!Subject: Debugging / Single Step into event procedures
!Date: Thu, 31 Jul 2003 09:13:02 -0700
!Lines: 15
!Message-ID: <02****************************@phx.gbl>
!MIME-Version: 1.0
!Content-Type: text/plain;
! charset="iso-8859-1"
!Content-Transfer-Encoding: 7bit
!X-Newsreader: Microsoft CDO for Windows 2000
!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!Thread-Index: AcNXfp3mllQdPJt4QWiFVzZLI8ubrQ==
!Newsgroups: microsoft.public.dotnet.framework.aspnet
!Path: cpmsftngxa06.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:163828
!NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
!
!under ASP.NET, single stepping in debug mode appears not
!to stop within event procedures. i.e. 1) Create web page
!with submit button and event procedure for the click
!event in the code behind page, 2) Breakpoint in the
!Page_Load, 3) debug the web page and click the submit
!button, 4) "step into" under debug several times, 5) The
!debugger does not stop at any of the statements in the
!click event handler. A breakpoint is needed in each
!event routine that you wish to single step through,
!rather than the debugger simply stopping at each line of
!your code (this was the behavior in VS 6.0 and in VB 6.0)
!
!Anyone know how to get this to work? Seems to me to be a
!significant flaw in the debugging capabilities.
!
!
Nov 17 '05 #2

If you explicitly set a breakpoint, the debugger stops.
However, the behaviour that I expect is to set a
breakpoint in the Page_Load event and then be able to
single step throughout ALL my code, including ANY event
procedures, (OnInit, click, etc.) To explicitly set
breakpoints throughout code in anticipation of which
event procedure might be invoked is tedious. In prior
versions of Visual Studio, this was not the case. Once a
breakpoint is hit, single stepping would take you through
each line of code, regardless of what routine
(constructor, page_load, OnInit, OnClick, etc.)
Sometimes, you do not fully understand the sequence of
events or which events are actually going to fire.
Single stepping should stop at ALL code.

There is a post back in September, 2002 which suggests
this was logged as a bug by a VS.Net tester.

Thanks for the follow up.
-----Original Message-----
Hello,

I tested it on my side and it works fine for me. If we want the debugger stop in the OnClick event handle of
that button, we needto set breakpoint at one line of this function.

Beside, please make sure that you have set the Enable ASP.NET debugging property to True in project's
properties page.
Thanks.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
!Content-Class: urn:content-classes:message
!From: "R Millman" <RM******@AllscriptsOL.com>
!Sender: "R Millman" <RM******@AllscriptsOL.com>
!Subject: Debugging / Single Step into event procedures
!Date: Thu, 31 Jul 2003 09:13:02 -0700
!Lines: 15
!Message-ID: <02****************************@phx.gbl>
!MIME-Version: 1.0
!Content-Type: text/plain;
! charset="iso-8859-1"
!Content-Transfer-Encoding: 7bit
!X-Newsreader: Microsoft CDO for Windows 2000
!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!Thread-Index: AcNXfp3mllQdPJt4QWiFVzZLI8ubrQ==
!Newsgroups: microsoft.public.dotnet.framework.aspnet
!Path: cpmsftngxa06.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:163828!NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
!
!under ASP.NET, single stepping in debug mode appears not!to stop within event procedures. i.e. 1) Create web page!with submit button and event procedure for the click
!event in the code behind page, 2) Breakpoint in the
!Page_Load, 3) debug the web page and click the submit
!button, 4) "step into" under debug several times, 5) The!debugger does not stop at any of the statements in the
!click event handler. A breakpoint is needed in each
!event routine that you wish to single step through,
!rather than the debugger simply stopping at each line of!your code (this was the behavior in VS 6.0 and in VB 6.0)!
!Anyone know how to get this to work? Seems to me to be a!significant flaw in the debugging capabilities.
!
!
.

Nov 17 '05 #3
Hello R,

I re-read the post thread and tested it on my side. Now I totally understand what you meant. :) In fact, the behavior of each IDE
is different. In VS 6.0, it is impossible because step over code will lead you to deep places. I think there should be something
related to the characteristic of different languages.

On my opinion, I think your suggestion is very good. There is currently no way to do this, but keep an eye out for it in the
future. We are looking at continual improvement, and it's this kind of feedback that let's us know what things you're trying to
do, that we haven't yet exposed for you.

Thanks very much for participating the community.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!Content-Class: urn:content-classes:message
!From: "R Millman" <RM******@AllscriptsOL.com>
!Sender: "R Millman" <RM******@AllscriptsOL.com>
!References: <02****************************@phx.gbl> <kC**************@cpmsftngxa06.phx.gbl>
<03****************************@phx.gbl> <M#**************@cpmsftngxa06.phx.gbl>
!Subject: RE: Debugging / Single Step into event procedures
!Date: Mon, 4 Aug 2003 14:45:48 -0700
!Lines: 188
!Message-ID: <03****************************@phx.gbl>
!MIME-Version: 1.0
!Content-Type: text/plain;
! charset="iso-8859-1"
!Content-Transfer-Encoding: 7bit
!X-Newsreader: Microsoft CDO for Windows 2000
!X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!Thread-Index: AcNa0cSG+7LjFigqQYepmpo0SQnJJQ==
!Newsgroups: microsoft.public.dotnet.framework.aspnet
!Path: cpmsftngxa06.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:164778
!NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
!
!
!VB 6.0 definitely works the way I am describing.
!VI 6.0 definitely works the way I am describing --
!specifically with the global.asa event procedures.
!
!In ASP.NET, I am trying to "debug" via single step a
!complete application. As an example, I set a breakpoint
!and then single step through the app watching variables,
!database, etc. for a specific "error" or bad data to
!occur. Since the event procedures are not automatically
!breakpointed in single step, if I miss a routine, code
!gets executed that I don't realize.
!
!In VB6.0 I can single step through all the event
!procedures, one at a time, in the order they are fired
!and see ALL code executed line by line.
!
!I am very surprised this has not been written up as an
!issue already.
!
!>-----Original Message-----
!>Hello,
!>
!>Thanks for the quick reponse.
!>
!>I used Visual C++ before. However, I didn't understand
!what you meant. For an example, now in a dialog, there is
!a button. In
!>the program, we have InitDialog event handler and
!button_click handler. As you mentioned, if we add a
!breakpoint in
!>InitDialog event handler, it will also stop when the
!code executes to button_click hanlder, right? But I don't
!think VC 6.0 works
!>like that.
!>
!>First, in order to make code run to button_click
!hanlder, the program should be in run mode and so we
!could click the button.
!>After that, if we didn't set breakpoint in button_click
!handler, the code won't stop in this function.
!>
!>For asp.net application, I think the behavior is almost
!the same. If we want button_onclick event handler is
!executed, we need
!>to make the web app in run mode first and then click the
!button. After that, the problem could enter
!button_onclick handler and
!>stops when there is a breakpoint.
!>
!>Please let me know if I have misunderood your question.
!>
!>Best regards,
!>Yanhong Huang
!>Microsoft Online Partner Support
!>
!>Get Secure! - www.microsoft.com/security
!>This posting is provided "AS IS" with no warranties, and
!confers no rights.
!>
!>--------------------
!>!Content-Class: urn:content-classes:message
!>!From: "R Millman" <RM******@AllscriptsOL.com>
!>!Sender: "R Millman" <RM******@AllscriptsOL.com>
!>!References: <02****************************@phx.gbl>
!<kC**************@cpmsftngxa06.phx.gbl>
!>!Subject: RE: Debugging / Single Step into event
!procedures
!>!Date: Sun, 3 Aug 2003 19:58:04 -0700
!>!Lines: 91
!>!Message-ID: <03****************************@phx.gbl>
!>!MIME-Version: 1.0
!>!Content-Type: text/plain;
!>! charset="iso-8859-1"
!>!Content-Transfer-Encoding: 7bit
!>!X-Newsreader: Microsoft CDO for Windows 2000
!>!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!>!Thread-Index: AcNaNDmAgediMMwOSm2jGDXek2QnRQ==
!>!Newsgroups: microsoft.public.dotnet.framework.aspnet
!>!Path: cpmsftngxa06.phx.gbl
!>!Xref: cpmsftngxa06.phx.gbl
!microsoft.public.dotnet.framework.aspnet:164487
!>!NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
!>!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
!>!
!>!
!>!If you explicitly set a breakpoint, the debugger
!stops.
!>!However, the behaviour that I expect is to set a
!>!breakpoint in the Page_Load event and then be able to
!>!single step throughout ALL my code, including ANY event
!>!procedures, (OnInit, click, etc.) To explicitly set
!>!breakpoints throughout code in anticipation of which
!>!event procedure might be invoked is tedious. In prior
!>!versions of Visual Studio, this was not the case. Once
!a
!>!breakpoint is hit, single stepping would take you
!through
!>!each line of code, regardless of what routine
!>!(constructor, page_load, OnInit, OnClick, etc.)
!>!Sometimes, you do not fully understand the sequence of
!>!events or which events are actually going to fire.
!>!Single stepping should stop at ALL code.
!>!
!>!There is a post back in September, 2002 which suggests
!>!this was logged as a bug by a VS.Net tester.
!>!
!>!Thanks for the follow up.
!>!
!>!>-----Original Message-----
!>!>Hello,
!>!>
!>!>I tested it on my side and it works fine for me. If we
!>!want the debugger stop in the OnClick event handle of
!>!that button, we need
!>!>to set breakpoint at one line of this function.
!>!>
!>!>Beside, please make sure that you have set the Enable
!>!ASP.NET debugging property to True in project's
!>!properties page.
!>!>
!>!>Thanks.
!>!>
!>!>Best regards,
!>!>Yanhong Huang
!>!>Microsoft Online Partner Support
!>!>
!>!>Get Secure! - www.microsoft.com/security
!>!>This posting is provided "AS IS" with no warranties,
!and
!>!confers no rights.
!>!>
!>!>--------------------
!>!>!Content-Class: urn:content-classes:message
!>!>!From: "R Millman" <RM******@AllscriptsOL.com>
!>!>!Sender: "R Millman" <RM******@AllscriptsOL.com>
!>!>!Subject: Debugging / Single Step into event procedures
!>!>!Date: Thu, 31 Jul 2003 09:13:02 -0700
!>!>!Lines: 15
!>!>!Message-ID: <02****************************@phx.gbl>
!>!>!MIME-Version: 1.0
!>!>!Content-Type: text/plain;
!>!>! charset="iso-8859-1"
!>!>!Content-Transfer-Encoding: 7bit
!>!>!X-Newsreader: Microsoft CDO for Windows 2000
!>!>!X-MimeOLE: Produced By Microsoft MimeOLE
!V5.50.4910.0300
!>!>!Thread-Index: AcNXfp3mllQdPJt4QWiFVzZLI8ubrQ==
!>!>!Newsgroups: microsoft.public.dotnet.framework.aspnet
!>!>!Path: cpmsftngxa06.phx.gbl
!>!>!Xref: cpmsftngxa06.phx.gbl
!>!microsoft.public.dotnet.framework.aspnet:16382 8
!>!>!NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
!>!>!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
!>!>!
!>!>!under ASP.NET, single stepping in debug mode appears
!>!not
!>!>!to stop within event procedures. i.e. 1) Create web
!>!page
!>!>!with submit button and event procedure for the click
!>!>!event in the code behind page, 2) Breakpoint in the
!>!>!Page_Load, 3) debug the web page and click the submit
!>!>!button, 4) "step into" under debug several times, 5)
!>!The
!>!>!debugger does not stop at any of the statements in
!the
!>!>!click event handler. A breakpoint is needed in each
!>!>!event routine that you wish to single step through,
!>!>!rather than the debugger simply stopping at each line
!>!of
!>!>!your code (this was the behavior in VS 6.0 and in VB
!>!6.0)
!>!>!
!>!>!Anyone know how to get this to work? Seems to me to
!be
!>!a
!>!>!significant flaw in the debugging capabilities.
!>!>!
!>!>!
!>!>
!>!>
!>!>.
!>!>
!>!
!>
!>
!>.
!>
!
Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ash | last post by:
Hi all, I have a C# web application which calls a number of stored procedures. I wish to step into the stored procedures while debugging i.e "Mix-mode debugging": I have completed the following...
3
by: Rhino | last post by:
I've spent the last couple of hours trying to figure out how to debug a Java stored procedure and am just going in circles. The last straw came when I got "Cannot open input stream for default"...
3
by: Ash | last post by:
Hi all, I have a C# web application which calls a number of stored procedures. I wish to step into the stored procedures while debugging i.e "Mix-mode debugging": I have completed the following...
8
by: Matt Theule | last post by:
While stepping through an ASP.NET project, I found that data was being inserted into my database even though I was not stepping through the code that inserted the data. I have a single page with...
2
by: Ash | last post by:
Hi all, I have a C# web application which calls a number of stored procedures. I wish to step into the stored procedures while debugging i.e "Mix-mode debugging": I have completed the following...
2
by: Tina | last post by:
I have been through several examples of debugging stored procedures with VS.NET, the most recent being in Chap 12 of Mike Gunderloy's certification book. I have never found one that works. ...
2
by: rodchar | last post by:
hey all, is there possibly a way to step into a stored proc while debugging in asp.net? thanks, rodchar
3
by: Paul | last post by:
I am running VB.NET 2005. I have a multi-project solution. One project contains all my base classes and user-controls. My other project is my application that uses the base classes and UCs. I...
0
by: DR | last post by:
Unable to start TSQL Debugging. Could not attach to SQL Server Process on 'srvname'. The RPC server is unavailable. I get this error when I try to run a SQL Server Project with a CLR stored...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
1
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. header("Location:".$urlback); Is this the right layout the...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it so the python app could use a http request to get...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...

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.