473,799 Members | 2,683 Online
Bytes | Software Development & Data Engineering Community
+ 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 1435
you could write a macro to do it....

"Johann Blake" <jo*********@gm ail.com> wrote in message
news:11******** ************@g4 9g2000cwa.googl egroups.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\projec t 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.Diagnost ics.Debugger.Br eak() call but that isn't going to suit
everyone.

HTH

Ollie Riches
"Johann Blake" <jo*********@gm ail.com> wrote in message
news:11******** **************@ g14g2000cwa.goo glegroups.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**********@p honeanalyser.ne t> wrote in message
news:eT******** ******@TK2MSFTN GP10.phx.gbl...
you want a break point added in every event handler in any code you have
written for a solution\projec t 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.Diagnost ics.Debugger.Br eak() 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******** *****@TK2MSFTNG P11.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**********@p honeanalyser.ne t> wrote in message
news:eT******** ******@TK2MSFTN GP10.phx.gbl...
you want a break point added in every event handler in any code you have
written for a solution\projec t 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.Diagnost ics.Debugger.Br eak() 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**********@p honeanalyser.ne t> wrote in message
news:uR******** ******@TK2MSFTN GP12.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******** *****@TK2MSFTNG P11.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**********@p honeanalyser.ne t> wrote in message
news:eT******** ******@TK2MSFTN GP10.phx.gbl...
you want a break point added in every event handler in any code you have written for a solution\projec t 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.Diagnost ics.Debugger.Br eak() 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*********@gm ail.com> wrote in message
news:11******** ************@g4 9g2000cwa.googl egroups.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
491
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 document". The only thing I did (that I remember) was change the name of the solution and modify the Project Dependencies. I searched in the Net but the only cases I found are for Web applications.
1
2553
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 - Stack around the variable 'resolver' was corrupted." Looking on internet i've seen that the compiler, if you're running your
1
11288
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 and disable "Automatic ANSI to OEM conversion": - This only affects isql from the command line, and no gui applications - http://support.microsoft.com/?scid=kb;EN-US;153449 - Start the "Client Network Utility" C:\WINDOWS\system32\cliconfg.exe
4
5098
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 in size (they just have lots of free space). How can I get DB2 to give the space back ?
4
5570
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 Help!
3
1573
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 and Settings\<USERNAME>\Local Settings\Application Data\assembly\dl3\P1ZM0W08.2LP\GQ9AD27V.M5C\8eb9c117\84f16698_922fc701
0
1313
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 found that it was just extremely slow over net, compared to http or ftp. I have been thinking of reasons. After reading the article I modified the server and clients.. in the following way.. server...
0
1240
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 by several programs. This programs use my dlls. When I want to debug my code I have to set breakpoints where the PC(ProgramCounter) stops. But at the moment I have to know what Member(or Method) of my code is called from the other Programm(using...
5
1445
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 products exceeds that limit, it automatically generates another page?
0
9689
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9550
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10248
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10032
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7573
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6811
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5469
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5597
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.