Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Visual Basic .NET debugging

Posted on 2002-06-04
5
Medium Priority
?
140 Views
Last Modified: 2013-11-25
Hi,

When I debug my VB.NET application and a error occurs, I cannot modify the code like I could in VB6.

I can only "break" into the code and see the variables, and if I press continue, the application just shutsdown, and I am back in the editor.

How can I edit my code when debugging?
0
Comment
Question by:Bodekaer
  • 3
  • 2
5 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 7053277
Sorry, that is not possible (unfortunately)
Of course, you can edit the code and press continue, which will make the application continue with the old code, thus it will exit if you don't have proper error handling...
CHeers
0
 

Author Comment

by:Bodekaer
ID: 7053283
(Edited by Computer101) :)

can you give an example of proper error handling then?

Is it by using the Try ... Catch functions?
0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 200 total points
ID: 7053304
Yes, exactly:

Try
  yourcode

Catch e1 as NullPointerException
  special error handling

catch e as Exception
  generic error handling

Finally
  finalyzing code

End Try

CHeers
0
 

Author Comment

by:Bodekaer
ID: 7053323
Ok thanks,

Another thing, how can I use indexing in VB.NET ?

I have label and would like to be an array. How to do that?

/Michael
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 7053328
See here for workarounds, as control arrays don't exists any longer in VB.net:
http://www.vbcity.com/forums/topic.asp?tid=3276
CHeers
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question