Questions tagged [conditional-breakpoint]

In software development, a conditional breakpoint is an intentional stopping or pausing place in a program, put in place for debugging purposes, when a conditions such as the reading, writing, or modification of a specific location in an area of memory, occurs.

In software development, a is an intentional stopping or pausing place in a program, put in place for debugging purposes. It is also sometimes simply referred to as a pause.

The most common form of a breakpoint is the one where the program's execution is interrupted right before a programmer-specified is executed. This is often referred to as an instruction breakpoint.

Other kinds of can also be used, such as the reading, writing, or modification of a specific location in an area of memory. This is often referred to as a conditional breakpoint, a data breakpoint, or a .

Breakpoints can also be used to execution at a particular time, upon a keystroke, etc.

Source:http://en.wikipedia.org/wiki/Breakpoint

155 questions
234
votes
13 answers

Break when a value changes using the Visual Studio debugger

Is there a way to place a watch on variable and only have Visual Studio break when that value changes? It would make it so much easier to find tricky state issues. Can this be done? Breakpoint conditions still need a breakpoint set, and I'd rather…
FlySwat
  • 172,459
  • 74
  • 246
  • 311
193
votes
3 answers

How do I set a conditional breakpoint in gdb, when char* x points to a string whose value equals "hello"?

Can I specify that I want gdb to break at line x when char* x points to a string whose value equals "hello"? If yes, how?
341008
  • 9,862
  • 11
  • 52
  • 84
130
votes
6 answers

How to use conditional breakpoint in Eclipse?

I want to know how to place a conditional breakpoint in Eclipse. I have a code like: public static void doForAllTabs(String[] tablist){ for(int i = 0; i doIt(tablist[i]); } } Now I want to put a breakpoint on…
MozenRath
  • 9,652
  • 13
  • 61
  • 104
102
votes
12 answers

How to create conditional breakpoint with std::string

Suppose I have this function: std::string Func1(std::string myString) { //do some string processing std::string newString = Func2(myString) return newString; } How do I set a conditional break when newString has a specific value? …
Eli
  • 6,353
  • 9
  • 30
  • 25
54
votes
8 answers

Can I set a breakpoint when variable is getting a specific value in .NET?

I am using Visual Studio 2010, and I know this feature is available in C++. I need to debug some code, that changes a variable to several values. I want to debug the code in a specific case, when the variable getting a specific value. I know I can…
43
votes
5 answers

Error when using a conditional breakpoint on System.Type

This is the function: public void Init(System.Type Type) { this.Type = Type; BuildFieldAttributes(); BuildDataColumns(FieldAttributes); } I've set a breakpoint on the first line (this.Type = Type) and I want to break when Type.FullName…
Rob Nicholson
  • 1,943
  • 5
  • 22
  • 37
33
votes
2 answers

how can I put a breakpoint on "something is printed to the terminal" in gdb?

I would like to know from where inside a huge application a certain message is printed. The application is so big and old that it uses all conceivable ways of printing text to the terminal; for example printf(), fprintf(stdout, ...) etc. I write to…
martin
  • 1,106
  • 2
  • 9
  • 11
31
votes
4 answers

What are data breakpoints?

I just came to know that there are data breakpoints. I have worked for the last 5 years in C++ using Visual Studio, and I have never used data breakpoints. Can someone throw some light on what data breakpoints are, when to use them and how to use…
anand
  • 11,071
  • 28
  • 101
  • 159
30
votes
2 answers

How to set conditional breakpoint based on string comparison in Visual Studio?

This is something I have tried from time to time over the years and never quite succeeded. I just want to set a conditional break point for Visual C++ 2012 based on string equality. The variable I want to test is string test; I tried test ==…
26
votes
2 answers

IntelliJ Idea (debugging) conditional breakpoint dependent on other breakpoints

I want to set a debug breakpoint in IntelliJ Idea that is only active, if another previous breakpoint was activated. For example i have a breakpoint B1 on line 10, and another breakpoint B2 on line 20. Even if B2s condition is true, the debugger…
klingt.net
  • 2,019
  • 3
  • 18
  • 19
22
votes
1 answer

Lldb : Setting conditional breakpoint with string equality as condition

I would like to set a conditional breakpoint with lldb. This is usually done using -c option : breakpoint set -f myFile.cpp -l 123 -c 'a==3' However, in my case I want to test if a std::string object is equal to a certain string value but doing…
Gael Lorieul
  • 3,006
  • 4
  • 25
  • 50
20
votes
4 answers

How can I monitor what's being put into the standard out buffer and break when a specific string is deposited in the pipe?

In Linux, with C/C++ code, using gdb, how can you add a gdb breakpoint to scan the incoming strings in order to break on a particular string? I don't have access to a specific library's code, but I want to break as soon as that library sends a…
Ross Rogers
  • 23,523
  • 27
  • 108
  • 164
19
votes
2 answers

Conditional Breakpoints on Call Stack

Is it possible to specify a breakpoint in Visual Studio 2010 that hits only if the calling methods up the call stack meet some specific condition? For example, and most likely, method name. I am ideally looking for a solution in Visual Studio…
Adam Houldsworth
  • 63,413
  • 11
  • 150
  • 187
18
votes
7 answers

Conditional breakpoint in Visual Studio

I want to set a breakpoint on a certain line in C# code when some other variable is equal to a specific value, say: MyStringVariable == "LKOH" How can I do that? I tried to right click on breakpoint icon -> Condition and then typed MyStringVariable…
Captain Comic
  • 15,744
  • 43
  • 110
  • 148
17
votes
2 answers

Why does the condition for a breakpoint failed to execute?

I want to temporarily disable a breakpoint for a short time, so I set a conditional breakpoint with the following condition: (global::System.DateTime.Now
mbx
  • 6,292
  • 6
  • 58
  • 91
1
2 3
10 11