473,513 Members | 2,533 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Stepping Backwards in Code ( debugger/VS03.net )

When stepping through code, to find where an error is thrown, the problem is
that I have to step threw the statement that causes the error, and if it's
in a class that's instantiated from the main program, then I may miss the
statement that causes the error.

How can I get the debugger to stop right at the statement that causes the
error.
Nov 22 '05 #1
4 1425
If the class is part of the same project then you can step into it with F11
instead of F10 (assuming you are using the default key mapping for VS.Net)
"c# newbie" <no****@leave.me.alone> wrote in message
news:71******************************@news.teranew s.com...
When stepping through code, to find where an error is thrown, the problem is that I have to step threw the statement that causes the error, and if it's
in a class that's instantiated from the main program, then I may miss the
statement that causes the error.

How can I get the debugger to stop right at the statement that causes the
error.

Nov 22 '05 #2
If the class is part of the same project then you can step into it with F11
instead of F10 (assuming you are using the default key mapping for VS.Net)
"c# newbie" <no****@leave.me.alone> wrote in message
news:71******************************@news.teranew s.com...
When stepping through code, to find where an error is thrown, the problem is that I have to step threw the statement that causes the error, and if it's
in a class that's instantiated from the main program, then I may miss the
statement that causes the error.

How can I get the debugger to stop right at the statement that causes the
error.

Nov 22 '05 #3
try CTRL + ALT + E, which will take you to the Debug exceptions window.
there you can tell visual studio to immediately break on any exception or
any .net exception etc. you can also find this under Debug -> Exceptions...

let me know if you have other questions or if this doesn't help.

jeff.

--

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.

Nov 22 '05 #4
Tell VS.NET to break when an excepion is thrown. Look on the
Debug/Exceptions menu.

Regards,
Aaron Queenan.

"c# newbie" <no****@leave.me.alone> wrote in message
news:71******************************@news.teranew s.com...
When stepping through code, to find where an error is thrown, the problem is that I have to step threw the statement that causes the error, and if it's
in a class that's instantiated from the main program, then I may miss the
statement that causes the error.

How can I get the debugger to stop right at the statement that causes the
error.

Nov 22 '05 #5

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

Similar topics

0
1525
by: Fernando Rodríguez | last post by:
Hi, I was trying to step through a first attemp of multithreaded script (see below), with PythonWin, but I'm gettign a very strange error: --------------------------------------------------------------------------------- import threading times = 100 delay = 10000
3
278
by: c# newbie | last post by:
When stepping through code, to find where an error is thrown, the problem is that I have to step threw the statement that causes the error, and if it's in a class that's instantiated from the main program, then I may miss the statement that causes the error. How can I get the debugger to stop right at the statement that causes the error.
1
1636
by: | ov | last post by:
Hi, My application includes a class library which has both managed C++ and unmanaged C++ code. The unmanaged C++ code includes only one class with both virtual methods and non-virtual methods. When I use the debugger I am able to step into methods that are non-virtual, however, when I try to step into methods which are virtual I receive the...
2
1588
by: John Black | last post by:
Hi, I wonder if there is any good way in debugging the code not steping into STL code, it is easy to do in normal statement, just click "step over", but when there are some STL type variable on the function argument list, I do not find a way to skip stepping into STL. Any suggestion?
5
10998
by: craig | last post by:
Is it possible to step into the code of a referenced .net assembly from within a project that is being debugged? Thanks!!!
0
1053
by: craig | last post by:
When stepping though C# code in Visual Studio, often times a line of code will cause an event handler to be run. However, it appears that the debugger will not automatically step into that event handler. Is there a way to cause it to step into event handlers automatically? Thanks!
5
2637
by: David C | last post by:
This is very strange. Say I have code like this. I am simply looping through a collection object in a foreach loop. Course course = new Course(); foreach(Student s in course.Students) { Console.WriteLine(s.StudentID); }
5
1464
by: NewToCPP | last post by:
There are several occations where we write onto someone else' memory region. Is there any debugging mechanism to find out which part of the code is causing this problem?
12
4443
by: mednyk | last post by:
T-SQL Debugger Doesn't Allow Stepping Through Stored Procedures And there is no other procedure with the same name owned by dbo or any other users. There is no error messages also, it just completes procedure and returns result server: Microsoft SQL Server 2000 - 8.00.818 (Intel X86) Microsoft Corporation Enterprise Edition on Windows NT...
5
1434
by: JPS | last post by:
Does anyone know how to add a VB class to a C# project and then instantiate the Vb object and step through the code? Can we do tihs with a VB DLL?
0
7178
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
7397
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
7565
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...
1
7128
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...
1
5103
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
3242
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1612
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
1
817
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
473
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.