Breakpoints hit when in release mode (vs2008)

Discussion in 'Microsoft C# .NET' started by Leon, Aug 28, 2009.

  1. Leon

    Leon Guest

    hi there,

    i am just having a strange problem with my project. i've set a few
    breakpoints to debug my program while in debug mode. usally when i switch
    to release mode and start the application, those breakpoints are just
    being ignored.

    but now, the program stops at the breakpoints even when set to release
    mode. is there any setting that i might have changed for this behaviour??

    i tried restarting visual studio several times and even rebooting the pc.

    any ideas??

    tx.
     
    Leon, Aug 28, 2009
    #1
    1. Advertisements

  2. Leon

    Jeff Johnson Guest

    "Leon" <bcmail08-news@DOya_NOThoo_SPAM.de> wrote in message
    news:%23QCad$%...

    > i am just having a strange problem with my project. i've set a few
    > breakpoints to debug my program while in debug mode. usally when i switch
    > to release mode and start the application, those breakpoints are just
    > being ignored.
    >
    > but now, the program stops at the breakpoints even when set to release
    > mode. is there any setting that i might have changed for this behaviour??
    >
    > i tried restarting visual studio several times and even rebooting the pc.
    >
    > any ideas??


    So if you don't want to debug at all how about just hitting Ctrl+F5 (or
    Debug | Start Without Debugging) instead of plain old F5 or clicking the
    green triangle?
     
    Jeff Johnson, Aug 28, 2009
    #2
    1. Advertisements

  3. Leon

    Peter Duniho Guest

    On Fri, 28 Aug 2009 07:57:26 -0700, Leon
    <bcmail08-news@doya_nothoo_spam.de> wrote:

    > hi there,
    >
    > i am just having a strange problem with my project. i've set a few
    > breakpoints to debug my program while in debug mode. usally when i
    > switch to release mode and start the application, those breakpoints are
    > just being ignored.
    >
    > but now, the program stops at the breakpoints even when set to release
    > mode. is there any setting that i might have changed for this behaviour??
    >
    > i tried restarting visual studio several times and even rebooting the pc.
    >
    > any ideas??


    Jeff's suggestion seems like the most appropriate one. If you don't want
    to hit breakpoints, don't run with the debugger attached.

    But as far as the specific question goes, not stopping at breakpoints when
    debugging the release build isn't a feature. At worst, that'd be a bug.
    At best, it may be a side-effect of a practical problem: the release build
    may not have a one-to-one correspondence between your C# program
    statements and the generated code. So it's possible to set a breakpoint
    on a program statement that doesn't actually generate any code tied to
    that statement in the release build, so there's no place for the debugger
    to break.

    Pete
     
    Peter Duniho, Aug 28, 2009
    #3
  4. Leon

    Leon Guest

    well because i was always good with just hitting F5 :) I thought when you
    select release and then hit F5 it would be the same like hitting ctrl F5.
    but i will try this.

    thx.

    Jeff Johnson wrote:
    > "Leon" <bcmail08-news@DOya_NOThoo_SPAM.de> wrote in message
    > news:%23QCad$%...
    >
    >> i am just having a strange problem with my project. i've set a few
    >> breakpoints to debug my program while in debug mode. usally when i switch
    >> to release mode and start the application, those breakpoints are just
    >> being ignored.
    >>
    >> but now, the program stops at the breakpoints even when set to release
    >> mode. is there any setting that i might have changed for this behaviour??
    >>
    >> i tried restarting visual studio several times and even rebooting the pc.
    >>
    >> any ideas??

    >
    > So if you don't want to debug at all how about just hitting Ctrl+F5 (or
    > Debug | Start Without Debugging) instead of plain old F5 or clicking the
    > green triangle?
    >
    >
     
    Leon, Aug 29, 2009
    #4
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Amos
    Replies:
    1
    Views:
    256
  2. rbg
    Replies:
    0
    Views:
    254
  3. Claire
    Replies:
    2
    Views:
    352
    Jon Skeet [C# MVP]
    Mar 13, 2008
  4. Author
    Replies:
    0
    Views:
    326
    Author
    Jun 19, 2008
  5. Peter Olcott
    Replies:
    0
    Views:
    228
    Peter Olcott
    Oct 21, 2008
Loading...

Share This Page