Skip to Main Content
Visual Studio Hacks
book

Visual Studio Hacks

by James Avery
March 2005
Intermediate to advanced content levelIntermediate to advanced
304 pages
19h 23m
English
O'Reilly Media, Inc.
Content preview from Visual Studio Hacks
144
|
Chapter 5, Debugging
#36 Set Breakpoints
HACK
The New Breakpoint dialog has four tabs:
Function
Used to add a breakpoint to a specific line of a specific function.
File
The tab shown in Figure 5-2; adds a breakpoint to a specific line in a
specific file in the solution.
Address
Adds a breakpoint to a specific memory address. Commonly used when
debugging unmanaged code.
Data
Used to add a breakpoint on a variable. When the variable changes, the
breakpoint will be hit. Data breakpoints can be used only when debug-
ging unmanaged code.
To add a breakpoint to a specific line of code, use the File tab. As Figure 5-2
shows, the File tab prompts you for the file and the line number for the
breakpoint.
Enter Break Mode When a Function Is Called
In addition to being able to break on a particular line of code, Visual Studio
makes it easy to break when a particular function is invoked. From the
Figure 5-2. New Breakpoint dialog—File tab
Set Breakpoints #36
Chapter 5, Debugging
|
145
HACK
Function tab of the New Breakpoint dialog—shown in Figure 5-3—you can
enter the name of the function where the breakpoint should be added.
In order to set the breakpoint, the function name needs to be fully qualified.
That is, you need to specify the function name as:
namespace.class.
methodName
. For example, suppose you have a C# Solution ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microsoft Visual Studio 2015 Unleashed, Third Edition

Microsoft Visual Studio 2015 Unleashed, Third Edition

Mike Snell, Lars Powers
.Net Framework Essentials

.Net Framework Essentials

Thuan L. Thai, Hoang Lam
C# 5.0 Unleashed

C# 5.0 Unleashed

Bart De Smet
Programming .NET Security

Programming .NET Security

Adam Freeman, Allen Jones

Publisher Resources

ISBN: 0596008473Errata Page