473,573 Members | 4,181 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3635
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******@Allsc riptsOL.com>
!Sender: "R Millman" <RM******@Allsc riptsOL.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: AcNXfp3mllQdPJt 4QWiFVzZLI8ubrQ ==
!Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
!Path: cpmsftngxa06.ph x.gbl
!Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:1638 28
!NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
!X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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******@Allsc riptsOL.com>
!Sender: "R Millman" <RM******@Allsc riptsOL.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: AcNXfp3mllQdPJt 4QWiFVzZLI8ubrQ ==
!Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
!Path: cpmsftngxa06.ph x.gbl
!Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:1638 28!NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
!X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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******@Allsc riptsOL.com>
!Sender: "R Millman" <RM******@Allsc riptsOL.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+7LjFig qQYepmpo0SQnJJQ ==
!Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
!Path: cpmsftngxa06.ph x.gbl
!Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:1647 78
!NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
!X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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******@Allsc riptsOL.com>
!>!Sender: "R Millman" <RM******@Allsc riptsOL.com>
!>!References: <02************ *************** *@phx.gbl>
!<kC*********** ***@cpmsftngxa0 6.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: AcNaNDmAgediMMw OSm2jGDXek2QnRQ ==
!>!Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
!>!Path: cpmsftngxa06.ph x.gbl
!>!Xref: cpmsftngxa06.ph x.gbl
!microsoft.publ ic.dotnet.frame work.aspnet:164 487
!>!NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
!>!X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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******@Allsc riptsOL.com>
!>!>!Sender: "R Millman" <RM******@Allsc riptsOL.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.030 0
!>!>!Thread-Index: AcNXfp3mllQdPJt 4QWiFVzZLI8ubrQ ==
!>!>!Newsgroups : microsoft.publi c.dotnet.framew ork.aspnet
!>!>!Path: cpmsftngxa06.ph x.gbl
!>!>!Xref: cpmsftngxa06.ph x.gbl
!>!microsoft.pu blic.dotnet.fra mework.aspnet:1 63828
!>!>!NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
!>!>!X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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
!>!>!significan t 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
1730
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 steps: Configured DCOM Connected to database via Server Manager (I can see the SQL server and the stored procedure)
3
2793
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" when I launched the IBM Distributed Debugger via D:\IBMDebug>idebug.exe -qdaemon -quiport=8000,8001 First, a bit of background. I am running DB2...
3
2062
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 steps: Configured DCOM Connected to database via Server Manager (I can see the SQL server and the stored procedure)
8
3510
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 inline code. The page has a Datagrid, a textbox and a button. When the button is clicked, the value of the textbox is inserted into the table...
2
4065
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 steps: Configured DCOM Connected to database via Server Manager (I can see the SQL server and the stored procedure)
2
1096
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. After enabling SQL Server debugging in the project properties, a step-into doesn't step into. What is the secret? Thanks, Tina
2
1276
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
2969
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 want to debug parts of the base and all of my application code. But there are parts of the base code that I just want to skip and not see (EVER)...
0
3132
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 Procedure in it. The target DB is SQL Server 2005 and im using VS 2005. I simply create a new SQL Server Project which creates a Test.sql, i then simply...
0
7789
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7707
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8037
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8215
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8086
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6432
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5605
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3743
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2227
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.