LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Conditional Breakpoint with Strings

Hello, 

how can i use the conditional breakpoints with Strings?

I have tested it with following Example:

const char testStr[]="Hello";

 

My conditional expression for the breakpoint: strcmp(testStr, "Hello")

CVI disable my breakpoint if i run it.

 

How can i write my conditional expression for c Strings?

Bests

Brian

0 Kudos
Message 1 of 3
(1,017 Views)

Hello,

to stop on conditions like a strcmp result you can use Breakpoint()  and maybe BeingDebuggedByCVI() because Breakpoint stops ANY debugging tool attached to the process even in Release code.

 

-----------------------
/* Nothing past this point should fail if the code is working as intended */
Message 2 of 3
(979 Views)

Hi, 

You can write strcmp comparison expression into the code and assign its return value into a variable (which shows if they match or not) and write the break condition according to that variable.

 

Hope this helps

S. Eren BALCI
IMESTEK
0 Kudos
Message 3 of 3
(972 Views)