• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 143
  • 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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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