Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Breakpoint Condition

Breakpoint Condition

Scheduled Pinned Locked Moved C#
csharpdebugginghelptutorialquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hum Dum
    wrote on last edited by
    #1

    I need help, Like we set breakpoint in .net, we can set condition and hit count of that breakpoint in Breakpoint window, now I want to know how to set this condition? Suppose there is variable x, i want to set like if x=5, then only it breaks or breakpoint hit, can we do like this!!!! plz explain in detail!!!!! I tried on my own many times but either breakpoint does not hit, or it says condition is invalid!!!!! I want to set a condition for variable in C#.net

    L N 2 Replies Last reply
    0
    • H Hum Dum

      I need help, Like we set breakpoint in .net, we can set condition and hit count of that breakpoint in Breakpoint window, now I want to know how to set this condition? Suppose there is variable x, i want to set like if x=5, then only it breaks or breakpoint hit, can we do like this!!!! plz explain in detail!!!!! I tried on my own many times but either breakpoint does not hit, or it says condition is invalid!!!!! I want to set a condition for variable in C#.net

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Just set "i == 5" as the condition regards

      1 Reply Last reply
      0
      • H Hum Dum

        I need help, Like we set breakpoint in .net, we can set condition and hit count of that breakpoint in Breakpoint window, now I want to know how to set this condition? Suppose there is variable x, i want to set like if x=5, then only it breaks or breakpoint hit, can we do like this!!!! plz explain in detail!!!!! I tried on my own many times but either breakpoint does not hit, or it says condition is invalid!!!!! I want to set a condition for variable in C#.net

        N Offline
        N Offline
        Nisar Inamdar
        wrote on last edited by
        #3

        hi frnd, statement x=5 ...........set the value of x to 5. it does not check whether x is equal to 5 or not. You have to use conditional operator(==) instead of assignment(=) operator. So use x==5 as a condition. Ok.:) Bye. Nisar Inamdar.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups