• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 148
  • Last Modified:

Visual Basic .NET debugging

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
Bodekaer
Asked:
Bodekaer
  • 3
  • 2
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
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
 
BodekaerAuthor Commented:
(Edited by Computer101) :)

can you give an example of proper error handling then?

Is it by using the Try ... Catch functions?
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
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
 
BodekaerAuthor Commented:
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
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now