Solved

Visual Basic .NET debugging

Posted on 2002-06-04
5
133 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

Industry Leaders: 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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

733 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