Debugging

Run to Cursor & Set/Show Next Statement

Run to Cursor

There is also a command in Visual Basic that lets you run the code to the insertion point, and then enter Break Mode. This is useful for one off stops, instead of always breaking at that point. To run to the cursor point, enter break mode (press Ctrl+Break), insert the cursor where you want it to run to, and click Run To Cursor from the Debug Menu (it is also on the Popup Menu).

Set/Show Next Statement

If you are in break mode and you want to skip a few lines of code (in the same procedure only), you can use the Set Next Statement command. All you need to do is position the cursor to where you want Visual Basic to skip to and press Set Next Statement on the Debug Menu. Alternatively you can drag the yellow arrow to the line you want.

To return to where the yellow line is (the next statement to be executed), press Show Next Statement on the Debug Menu.

You might also like...

Comments

About the author

James Crowley

James Crowley United Kingdom

James first started this website when learning Visual Basic back in 1999 whilst studying his GCSEs. The site grew steadily over the years while being run as a hobby - to a regular monthly audien...

Interested in writing for us? Find out more.

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“I have always wished for my computer to be as easy to use as my telephone; my wish has come true because I can no longer figure out how to use my telephone” - Bjarne Stroustrup