Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

Rated
Read 34,946 times

Contents

Related Categories

Debugging - Run to Cursor & Set/Show Next Statement

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.

James first started writing tutorials on Visual Basic in 1999 whilst starting this website (then known as VB Web). Since then, the site has grown rapidly, and James has written numerous tutorials, articles and reviews on VB, PHP, ASP and C#. In October 2003, James formed the company Developer Fusion Ltd, which owns this website, and also offers various development services. In his spare time, he's a 3rd year undergraduate studying Computer Science in the UK. He's also a Visual Basic MVP.

Comments