Editing code while debugging

G

Guest

Good day all,
As a dotnet newbie there are a couple of things I am hoping some one can
help me with.
(1) In vb6 and vba I can F8 and step through a program. Whilst stepping
through I can edit the code easily whilst the program is running. With dotnet
as soon as I start the code screen comes up read only ..... Is there a way I
can edit like in VBA and VB6
(2) In VB6 and VBA I can use on error goto 0 etc to break on an error etc.
In dot net the code I am debugging uses the try command etc. If an error
occurs it is almost impossible for me to find the line that caused the error.
Is there an easy way to go back to the line that caused the error ?

Thanks for your help
Ian.
 
C

CT

Ian,

Inline please.

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk

Ian said:
Good day all,
As a dotnet newbie there are a couple of things I am hoping some one can
help me with.
(1) In vb6 and vba I can F8 and step through a program. Whilst stepping
through I can edit the code easily whilst the program is running. With
dotnet
as soon as I start the code screen comes up read only ..... Is there a way
I
can edit like in VBA and VB6

Edit and Continue (E&C) is not supported in VS .NET 1.x, but it is in VS
..NET 2.0 to be released on November 7.
(2) In VB6 and VBA I can use on error goto 0 etc to break on an error etc.
In dot net the code I am debugging uses the try command etc. If an error
occurs it is almost impossible for me to find the line that caused the
error.
Is there an easy way to go back to the line that caused the error ?

You need to inspect the exception object in your Catch block. In addition,
are you running in Debug mode, i.e. run the application by pressing F5 and
not CTRL+F5.
 
G

Guest

My experience in VBA is that you can't really edit the code as much as change
variable data. This you can do in .Net, very similarly to the method in VBA.
 
G

Guest

I have had a look at the exception object and I can see via the locals window
some useful information. However when the catch try is three or four back in
the stack ( ie the click ok calls a subroutine that calls a function etc )
then the information on the error is lost. Is there a smart way of see what
happened or do you need a "catch" in every sub and function ?

Thanks
Ian
 
C

CT

Ian,

Exception chaining is the term for this. Take a look at the InnerException
property, which holds the previous exception thrown.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top