conditional breakpoint

oa do u know how to put conditional breakpoint or atleast do u know what conditional breakpoints are .. nooooo hehehehehehe chull cheeeeez hi hoooo anyhow conditional breakpoints are such breakpoints which stop debugging execution conditionally i.e, either condition “is true” or “has changed” if criteria met then breakpoint will get active if no then execution wont stop on breakpoint ..isn’t that coooooool …. look on following code and then steps to put breakpoint on it😉

static void Main(string[] args)
{
int result = add(11, 3);
Console.Write(result);
Console.Read();
}

public static int add(int a, int b)
{
int c;
c = a + b;
return c;
}

steps:

  •  press control+alt+A+B to get/activate breakpoint window
  • In the Breakpoints window, click New to create a new breakpoint.
  • On the Function tab, type add for Function. Type 1 for Line, type 1 for Character, and then set Language to C# then press OK
  • now right click on that breakpoint and select condition, and make sure that the Condition check box is selected. Type a > 0 for Condition, make sure that the is true option is selected, and then click OK.
  • In the New Breakpoint dialog box, click OK.
  • On the Debug menu, click Start.
  • The program stops at the IF statement in the Main method. To continue program execution, click Continue on the Debug menu.
  • The program stops again at the addfunction. Continue to run the program.

now u must be saying thank u adnan thank u ..haina hehehehe no need of it.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s