Solved

Visual Basic .NET debugging

Posted on 2002-06-04
5
134 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 50 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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 …
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

705 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