Library tutorials & articles

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.

Comments

  1. 01 Jan 1999 at 00:00

    This thread is for discussions of Debugging.

Leave a comment

Sign in or Join us (it's free).

James Crowley 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 audience ...

Related discussion

Related podcasts

  • Christian Beauclair

    14 mai 2008 (�mission #0074) ::.Christian Beauclair: Stratégies de migration VB6 vers .NET Nous discutons avec Christian Beauclair des stratégies de migration VB6 vers .NET. Entre autres, nous discutons comment utiliser le "VB 6 Code Advisor" et le "Interop Forms Toolkit" pour ajouter la puiss...

We'd love to hear what you think! Submit ideas or give us feedback