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

Debugging at runtime

Is it possible to have an application, compiled in debug mode, report what
line or linenumber caused an error or exception at runtime?

I'm using VS2003. I'd appriciate if anyone could point me in the right
direction.

Thanks,

Dave M.
Jun 28 '06 #1
2 842
Hello Dave:
Choose Debug Menu-> Exceptions
Choose Break into Debugger for all the exceptions When the exception is
thrown.
Hope it helps.
dave m wrote:
Is it possible to have an application, compiled in debug mode, report what
line or linenumber caused an error or exception at runtime?

I'm using VS2003. I'd appriciate if anyone could point me in the right
direction.

Thanks,

Dave M.


Jun 28 '06 #2

IdleBrain wrote:
Hello Dave:
Choose Debug Menu-> Exceptions
Choose Break into Debugger for all the exceptions When the exception is
thrown.
and then, just to be clear, in your code, do something like:
Try
'[the code you want to run goes here]
Catch ex As Exception
Console.Write ex.Message & " " & ex.StackTrace.ToString
End Try

The stack trace will have the line number and all sorts of other
helpful info.
Hope it helps.
dave m wrote:
Is it possible to have an application, compiled in debug mode, report what
line or linenumber caused an error or exception at runtime?

I'm using VS2003. I'd appriciate if anyone could point me in the right
direction.

Thanks,

Dave M.


Jun 28 '06 #3

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

Similar topics

5
by: Bob Bamberg | last post by:
Hello All, I have been trying without luck to get some information on debugging the Runtime Error R6025 - Pure Virtual Function Call. I am working in C++ and have only one class that is derived...
0
by: Gary Karasik | last post by:
Hi, One of my SBS 2K3 servers is giving the following errors when trying to run certain applications. Some Googling indicates that these are .Net Framework errors. I've tried reapplying .Net...
1
by: Sathiamoorthy | last post by:
I received a runtime error when I was working in MyApp.exe MyApp.exe Common Language Runtime Debugging Services Application has generated an exception that could not be handled. Process ID=0x14...
5
by: snicks | last post by:
I'm trying to exec a program external to my ASP.NET app using the following code. The external app is a VB.NET application. Dim sPPTOut As String sPPTOut = MDEPDirStr + sID + ".ppt" Dim p As...
4
by: yinglcs | last post by:
I am trying to debug a C++ program in GDB on linux. I want to dump out the content of the "this" object, Here is what I get: (gdb) print *this $2 = {path = <incomplete type>} My question is...
5
by: phnimx | last post by:
Hi , We have developed a number of plug-in .NET Library Components that we typically deploy with our various applications by installing them into the GAC. Each of the applications contains an...
0
by: TC | last post by:
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...
0
by: stimpy_cm | last post by:
Hi everyone, I’m not a programmer but have a little notion about how things work. I recently downloaded an emulator for my calculator (Texas Instruments Voyage 200), the program uses a library...
3
by: Rick | last post by:
We have a web site that was built as an ASP.Net Web Site, I am unable to remote debug, when build ing the web site there is not a dll or PDB file generated. I can debug on my local machine but...
0
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgRGVzYXJyb2xsbw==?= | last post by:
Hi misters, i have application winforms in VB.NET When I press F5, for executing Debug....it's slows... I see,
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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
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.