Why do the DEBUG (F9) breakpoints not trigger 80% of the time? How do I get it 100%?

Why do the DEBUG (F9) breakpoints not trigger 80% of the time

How do I get it 100%

Michael


Answer this question

Why do the DEBUG (F9) breakpoints not trigger 80% of the time? How do I get it 100%?

  • Jean Uninstall plz

    Great!!! I think we may have figured out why your BP's are not getting hit 100% of the time.  Let's hope this is the case.

    What you now need to do to fix this, is the following:

    1.  Go to the Project Properties
    2.  Go to the Compile Tab (where it shows you the Configuration)
    3.  Change the Configuration to read Active (Debug),  NOT Active (Release) via the Combo Box

    Now when you press F5, your BP should ALWAYS get hit.  If this is the not the case still, we'll see if Optimizations is ON in the Debug Config (however it should not be by default).

    Please let me know whether this worked or not.

    thanks,

  • pg2000

    It is working now.

    Thank you.

    Michael

  • gayan007

    OK, so we need to make sure you are actually in the right configuration

    When you have the Solution in the Solution Explorer selected, go to the Property Browser window and let me know what the value is for "Active Config"

    thanks!

    Kathy

    PS.  where are your breakpoints at btw   is it in code that might be marked as either Debugger Step Through or Non User Code



  • BASmith

    Hi Michael

    I work in VB Testing on the Debugger UI and I would like to help figure out what could be happening.

    In VS 2005, we have this notion of Simplified Configuration.  There is a chance that somehow, your project's configuration for debugging is now set to Release (instead of Debug).  If this happens, your code becomes optimized and BP's/Stepping will be off because the PDB no longer mathes your code.  To check this you can do the following:  Go to Tools.Options.Projects and Solutions and Check "Show Advanced Build Configuration".  Close the Tools.Options dialog.  Then go to the Project Properties and view the Compile Tab.  It should show you which configuration is currently Active.  Can you tell me which one (also, double click on the Advanced Compile Options button and check if Optimizations is ON/OFF)

    The other possibility is where your BP is.  It could be in a method marked as Non User Code or Debugger Step Through.  However, since you say it sometimes does get hit, this doesn't sound like the case.

    Also - when you are in Break Mode, what the does the BP glyph look like   is it a solid red dot, or is it a hallow red dot with a yellow mark on it   If it's the latter, take your mouse and hover over it to get the tooltip description

    thanks in advance,

    Kathy



  • BenK95781

    On the compile tab the configuration is ACTIVE.  I cannot see anything on the compile tab that says OPTIMIZATIONS.  Unfortunately I cannot see if it is on or off.

    The BP glyph I think that is the RED button on the left column of the code.  I have been able to get it to toggle on and off by clicking on the F9 function key and the left button on my mouse.  The right button provides me the choice of deleting an disabling the breakpoint in a small list of choices.

    Michael

  • VisuallyImpaired

    Hi Michael

    Next to Configuration on the Compile Tab, in the Combo box it should say in parenthesis, "Debug" or "Release", so that it looks like "Active (Debug)", or "Active (Release)". 

    Are you debugging on Express or Visual Studio If it's on Express, we won't display the Advanced Compile Options... button on the compile page.  However, if it's on Visual Studio, there should be button right below the Configuration section on the Compile Tab.  If you click this button, it brings up another dialog box that will have a check box titled "Enable Optimizations".  I would like to know if it's checked or not checked...

    I wish i could have you include a picture / bitmap of what the BP glyph looks like but it doesn't look like the forums alllow this... If the breakpoint had been red but hallow, if you took the mouse over the BP during break mode (not during design mode), it would display something like "The breakpoint will not currently be hit.  No symbols have been loaded for this document", etc.

    Also - could you post your code in this   is it relatively small

    thanks in advance

    Kathy

  • alex2007

    Hello
    I tried that properties tab stuff and I still cant get the debugger to stop at the break points.
    And I now have a load of them in there :)
    Help!

  • Jorge González

    Are you using conditional Compilation conditions

    #IF ....

    #END IF

    as if the debug point is within a conditional compilation that is not currently set then these breakpoints wont work.


    Perhaps some simple code examples to enable us to see what is occuring may help.   Is it the same breakpoints which arent working or different ones each time

  • SachaT

    The code is executed!!

    I guarantee it is is simple test code that I am working with and the debug breakpoint is set at field.text = "Testing".

    The text always displays but the breakpoint is almost never triggered.

    I have been doing these sorts of things for over 27 years.

    I understand EXACTLY what I need to do and what is happening and not happening.

    I try this over and over again and somewhere between every 5th and 20th attempt it actually works.

    I need to get it working every single time.

    The only time I actually have gotten it working was once after after a restart.

    I have restarted another 10 times since then and reload, reset, restart, retest over and over and over again.

    Michael

  • cbroussard

    There may be several reasons. For instance, if you are debugging code which belongs to a project not currently loaded in the IDE, change the code there may cause its breakpoints not to work unless you load the project and build it.


  • Akhil Jindal Verizon

    I only have one project !!!

    Michael

  • toni_gom

    Also

    Can you tell me which version of VB Express you are using   is it a CTP build (and if so, from which month )

    Or is it the Beta2 build

    thanks in advance,


  • booboo85

    Beta 2

  • KrishManohar

    There are four options and they are ACTIVE (RELEASE), DEBUG, RELEASE and ALL CONFIGURATIONS.  The current selection is ACTIVE (RELEASE).

    I am debugging using Visual Studio 2005 Express Edition Beta 2.  No buttons on the compile tab.

    I have already tried pasting a print screen image into this field and it just appears like a big blank space.

    "Public Class Order

       Public Sub Order_Class()

          Testing.Text = "Testing"

       End Sub

    End Class"

    Breakpoint is set at 'Testing.Text = "Testing"'

    Michael

  • Why do the DEBUG (F9) breakpoints not trigger 80% of the time? How do I get it 100%?