473,395 Members | 1,941 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,395 software developers and data experts.

Structuring Code for Effective Debugging

TC
When I'm debugging code and a runtime error occurs, Visual Studio
usually gives me a specific error message and identifies the line
which caused the error.

Sometimes, however, it does not do those things. Instead, it gives me
the generic error message "Exception has been thrown by the target of
an invocation" and identifies a line higher up in the call stack. When
this happens, it can be difficult to diagnose the cause of the runtime
error.

1. Why do I sometimes get the generic message? What rules determine
Visual Studio's behavior in this regard?

I've found that code in New() tends to raise the generic message. If I
move the code to the Load event procedure, it tends to raise the
specific message. Because of this, I'm considering avoiding New(), and
using the Load event procedure instead.

2. Have other programmers found it necessary to avoid New(), or make
other structural decisions, to facilitate effective debugging?
-TC

Jul 26 '07 #1
0 989

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

Similar topics

15
by: Enzo | last post by:
Hi Ng, It's possible to protect the source code of a js file? With PHP? Thanks in advance! Enzo
1
by: jmgro | last post by:
I need help in structuring a 200 question survey. Each question has three responses, and I want all 200 questions displayed at the same time with the user using the scrollbar to go down. What is...
3
by: arun.hallan | last post by:
Hi, I need some structuring help. I have a set of data, in the form of an arraylist of objects. Each object is the same, and can be treated as a generic object which gets and sets properties....
4
by: awebguynow | last post by:
My Auth code works locally but not on my host, and I'm debugging it to find out, why not. Except where noted, I'll be referring to my webhost's configuration. I'm using a .htaccess "AddHandler"...
239
by: Eigenvector | last post by:
My question is more generic, but it involves what I consider ANSI standard C and portability. I happen to be a system admin for multiple platforms and as such a lot of the applications that my...
7
by: JohnGoogle | last post by:
Hi, I'm new to Visual C# and I am looking for guidance with structuring projects. I am wanting to develop a DLL assembly which will contain all my common classes which will be used by various...
1
by: Celldss | last post by:
I have a .Net service (VB - 1.1 SP1) deployed in our environment that is experiencing an odd issue. The service does a series of file & registry based checks, logs to the event log and uploads the...
232
by: robert maas, see http://tinyurl.com/uh3t | last post by:
I'm working on examples of programming in several languages, all (except PHP) running under CGI so that I can show both the source files and the actually running of the examples online. The first...
12
by: WaterWalk | last post by:
Hello. I wonder what's the effective way of figuring out how a piece of python code works. With C I often find it very useful to be able to run the code in step mode and set breakpoints in a...
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:
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
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
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
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...
0
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,...

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.