473,387 Members | 1,303 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,387 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 3620
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.