Breakpoints in Visual Basic .NET

Tags: VB.NET, VB 2008, VB 2010, VB 2012, VB 2013

This lesson describes the breakpoints in Visual Basic .NET

Sometimes when you try to debug only a small part of already large program you will want your code to run up to a certain point and then stop there.

This is where breakpoints come in handy as they cause execution of your code to stop anywhere they are set.

The breakpoints can be set anywhere in the code and that code will execute to that point and then will stop.

Note: Execution of the code stops before executing the code on which the breakpoint is set.

The breakpoints can be set when you write your code, or you can set them at runtime by switching to your code and setting the breakpoint at the desired location.

To set a breakpoint you click the gray margin next to the line you want to debug or press F9 on your keyboard.



When Visual Studio encounters a breakpoint, execution of your code halts, and then the program gets in a break mode.

When your program gets in a break mode, a lots of debug features become available.



Previous Lesson | Next Lesson


Share This

Home | About | Contact | Privacy Policy

Copyright visual-basic-tutorials.com 2017 - All Rights Reserved.