473,473 Members | 2,122 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Suggestion on how MS can improve debugging with "automatic breakpoints"

It would be nice to have Visual Studio .NET automatically break into
the code whenever an event is generated without having to explicity set
a breakpoint. It often happens that when a piece of code is executed,
it automatically forces events somewhere else in code to be raised.
Sometimes these events are generated by the source code written by the
developer and sometimes they are done by controls or other
behind-the-scenes code that was not written by the developer. Because
no breakpoint may exist in an event, the programmer may not even know
that the event was raised and the code within this event may do
something that could explain reasons why something is happening or not
happening. A feature should be added to VS that allows the programmer
to cause the IDE to stop on the first line in any event whenever the
event is fired. This shouldn't be too difficult to implement since it
is internally known what is an event and what isn't. In addition, it
should be possible to exclude certain events from being caught. If a
timer event were being used, it would constantly trigger and this may
not be of any interest to the programmer. This automatic breakpoint
feature in events is one that all programmers would love.

Johann Blake

Nov 17 '05 #1
7 1420
you could write a macro to do it....

"Johann Blake" <jo*********@gmail.com> wrote in message
news:11********************@g49g2000cwa.googlegrou ps.com...
It would be nice to have Visual Studio .NET automatically break into
the code whenever an event is generated without having to explicity set
a breakpoint. It often happens that when a piece of code is executed,
it automatically forces events somewhere else in code to be raised.
Sometimes these events are generated by the source code written by the
developer and sometimes they are done by controls or other
behind-the-scenes code that was not written by the developer. Because
no breakpoint may exist in an event, the programmer may not even know
that the event was raised and the code within this event may do
something that could explain reasons why something is happening or not
happening. A feature should be added to VS that allows the programmer
to cause the IDE to stop on the first line in any event whenever the
event is fired. This shouldn't be too difficult to implement since it
is internally known what is an event and what isn't. In addition, it
should be possible to exclude certain events from being caught. If a
timer event were being used, it would constantly trigger and this may
not be of any interest to the programmer. This automatic breakpoint
feature in events is one that all programmers would love.

Johann Blake

Nov 17 '05 #2
Can you explain more in detail how?

Thanks
Johann

Nov 17 '05 #3
you want a break point added in every event handler in any code you have
written for a solution\project open in VS.Net.

therefore just create a script or macro to loop through all the classes in a
project and examine any object instant for any event handlers and then go to
all the event handlers and insert breakpoints as required - simple :)

personally I think you are better of just using a
System.Diagnostics.Debugger.Break() call but that isn't going to suit
everyone.

HTH

Ollie Riches
"Johann Blake" <jo*********@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Can you explain more in detail how?

Thanks
Johann

Nov 17 '05 #4
Your solution wouldn't work since the suggestion is to break on all event
handlers, not just in your own code.

"Ollie Riches" <ol**********@phoneanalyser.net> wrote in message
news:eT**************@TK2MSFTNGP10.phx.gbl...
you want a break point added in every event handler in any code you have
written for a solution\project open in VS.Net.

therefore just create a script or macro to loop through all the classes in a project and examine any object instant for any event handlers and then go to all the event handlers and insert breakpoints as required - simple :)

personally I think you are better of just using a
System.Diagnostics.Debugger.Break() call but that isn't going to suit
everyone.

HTH

Ollie Riches

Nov 17 '05 #5
I realise that, why would you want to break on an event handler for which
you don't have any debug information.

"Lebesgue" <no****@spam.jp> wrote in message
news:eW*************@TK2MSFTNGP11.phx.gbl...
Your solution wouldn't work since the suggestion is to break on all event
handlers, not just in your own code.

"Ollie Riches" <ol**********@phoneanalyser.net> wrote in message
news:eT**************@TK2MSFTNGP10.phx.gbl...
you want a break point added in every event handler in any code you have
written for a solution\project open in VS.Net.

therefore just create a script or macro to loop through all the classes
in

a
project and examine any object instant for any event handlers and then go

to
all the event handlers and insert breakpoints as required - simple :)

personally I think you are better of just using a
System.Diagnostics.Debugger.Break() call but that isn't going to suit
everyone.

HTH

Ollie Riches


Nov 17 '05 #6
That's true, maybe this is the thing Johann is missing. But you could still
break on event handlers in your own referenced assemblies (for which you may
have debug information (and still don't have source code so macros wouldn't
help)).

"Ollie Riches" <ol**********@phoneanalyser.net> wrote in message
news:uR**************@TK2MSFTNGP12.phx.gbl...
I realise that, why would you want to break on an event handler for which
you don't have any debug information.

"Lebesgue" <no****@spam.jp> wrote in message
news:eW*************@TK2MSFTNGP11.phx.gbl...
Your solution wouldn't work since the suggestion is to break on all event handlers, not just in your own code.

"Ollie Riches" <ol**********@phoneanalyser.net> wrote in message
news:eT**************@TK2MSFTNGP10.phx.gbl...
you want a break point added in every event handler in any code you have written for a solution\project open in VS.Net.

therefore just create a script or macro to loop through all the classes
in

a
project and examine any object instant for any event handlers and then
go to
all the event handlers and insert breakpoints as required - simple :)

personally I think you are better of just using a
System.Diagnostics.Debugger.Break() call but that isn't going to suit
everyone.

HTH

Ollie Riches



Nov 17 '05 #7
There will be a chat concerning VS Debugger tomorrow, maybe you could join
and see what would the Visual Studio Debugger team think of your suggestion

http://msdn.microsoft.com/chats/#05_0908_MSDN_VSD

"Johann Blake" <jo*********@gmail.com> wrote in message
news:11********************@g49g2000cwa.googlegrou ps.com...
It would be nice to have Visual Studio .NET automatically break into
the code whenever an event is generated without having to explicity set
a breakpoint. It often happens that when a piece of code is executed,
it automatically forces events somewhere else in code to be raised.
Sometimes these events are generated by the source code written by the
developer and sometimes they are done by controls or other
behind-the-scenes code that was not written by the developer. Because
no breakpoint may exist in an event, the programmer may not even know
that the event was raised and the code within this event may do
something that could explain reasons why something is happening or not
happening. A feature should be added to VS that allows the programmer
to cause the IDE to stop on the first line in any event whenever the
event is fired. This shouldn't be too difficult to implement since it
is internally known what is an event and what isn't. In addition, it
should be possible to exclude certain events from being caught. If a
timer event were being used, it would constantly trigger and this may
not be of any interest to the programmer. This automatic breakpoint
feature in events is one that all programmers would love.

Johann Blake

Nov 17 '05 #8

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

Similar topics

1
by: Amos | last post by:
In framework 1.0, In my Windows application in the breakpoints I add to one of the classes, I get this message: "The breakpoint will not currently be hit. No symbols have been loaded for this...
1
by: Francesc Guim Bernat | last post by:
Dear colleagues, i'm getting in troubles using one XML library with Visual Studio .NET and Xerces with Xalan. When i execute the code i get the next run time error: "Run-Time Check Failure #2...
1
by: Philip Bondi | last post by:
Hello to all SQL Server junkies who work with non-English characters: For people running scripts from the command line using ANSI files with special characters, it is very important to use isql...
4
by: Philip Nelson | last post by:
Folks, I've got a database and tablespaces "managed by automatic storage". I've deleted a lot of data from some tables. I've then reorged them. But the tablespaces don't appear to shrink...
4
by: Kuldeep | last post by:
Hi All, ..NET Framework - 1.0 ASP.NET Everytime I open my open, I get this error message "Unable to load one or more breakpoints" Even after this, I can build my application and run Please...
3
by: schouwla | last post by:
Hi, I am a c# newbies.. I am having some problems with my dll it sometimes get's added to my cache even I don't want it to land there. My assembly is added to the cache here: C:\Documents...
0
by: sherkhan | last post by:
Hello Everyone. I have come across this article (http://dast.nlanr.net/Projects/ Autobuf_v1.0/autotcp.html) called "Automatic TCP window tuning". After my first newbie file transfer I wrote and...
0
by: nemo | last post by:
Hello, I m looking for a feature that could really help everyone debugging code. I often have to use the "Attach to Process..." function from Visual Studio 2005 Prof. to debugg my code called...
5
tharden3
by: tharden3 | last post by:
I'm data-basing products for a local manufacturing company (I've been designing their entire website). Can I write PHP so that I set the limit of products visible per page, and then if the number of...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
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 ...

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.