ASP.Net/C# Breakpoint is not working. RRS feed

  • Question

  • User1451626108 posted

    I'm having problem in using breakpoint. I'm creating a website in VS2005 in ASP.Net/C# language. but the problem is i can't seem to use the breakpoint.

    After putting the toggle breakpoint, and i clicked start debugging. it won't hit the breakpoint. but it will start running.

    however at the breakpoint (it should be a big red dot), it changed to something like this.

    then the program will continue to run but not hitting the breakpoint.

    i tried my program using my friend vs2005, the breakpoint can be hit...Frown

    does anyone able to help me to solve the problem? i tried to search the solution in google and here. but seems like the solution doesn't work.

    can anyone help, please?

    Tuesday, February 2, 2010 3:27 PM

All replies

  • User187056398 posted

    Have you tried a clean and rebuild all? 

    Tuesday, February 2, 2010 3:37 PM
  • User1451626108 posted

    how to chean and rebuild all?? reinstall?

    Tuesday, February 2, 2010 3:45 PM
  • User187056398 posted

    Do not reinstall.

    Look at the menu options under the Build menu.

    Tuesday, February 2, 2010 3:49 PM
  • User1451626108 posted

    I tried Rebuild Solution. Failed.Frown

    Tried Rebuild Website. Failed. Frown

    any other solution?

    Tuesday, February 2, 2010 3:57 PM
  • User-855864740 posted


    Where u actually added the break point ?Some times if it is inside some event or code that didn't fire as part of execution so first check by adding break point near the page load event then press the F11 key step by step execution will lead to your break point.


    Tharadas k.p

    Wednesday, February 3, 2010 3:13 AM
  • User187056398 posted

    You can try putting one in programmatically:


    And you are building in debug mode...right?


    Wednesday, February 3, 2010 8:24 AM
  • User1451626108 posted

    i just press F5 to run it.

    and i just put the breakpoint toggle at the page_load function. it is impossible that it won't go throught that function right.

    it will give me error like this one:

    how can it be solve???

    put it like this, in between the code?:

        protected void btnSearch_Click(object sender, EventArgs e)

            SqlCommand cmdSelect;
            SqlDataReader dtrSelect;
            SqlConnection con = new SqlConnection(@"server=PENNY\SQLEXPRESS; Database=ats;integrated security=true");

                cmdSelect = new SqlCommand("Select * from Food Where Food_Desc = @FDesc", con);



    but it give me error like "WebDev.WebServer.exe has encountered a user-defined breakpoint"


    Wednesday, February 3, 2010 2:31 PM
  • User187056398 posted

    Try here:


    There are some good comments/suggestions added to the post.

    Wednesday, February 3, 2010 2:41 PM
  • User-855864740 posted


    You can add break point for page load , even if u add it will show a warning like that dont worry abt that you just continue by hitting f11 the break point will automatically jump to the next line.That is also in the case of any other function starting.so in further u just add the break point after the opening bracket of the function and the when ever that event has fired the corresponding the break point you put will work accordingly....



    Tharadas k.p 

    Thursday, February 4, 2010 1:29 AM
  • User1451626108 posted

    too bad i tried everything removing the .suo, remove the temp file everything cant work... =(

    Thursday, February 4, 2010 8:55 AM
  • User-757609608 posted




    This line is working for me.....

    Thanks a lot...

    Thursday, July 12, 2012 1:34 AM
  • User910610609 posted

    I know this is an old thread but I had this same problem and found a strange way to fix it so I thought id share it.

    Delete the protected function (Example Button_Click) That is calling the script then remake it.

    I have no idea how this worked... I'm assuming there was something written in the designer that was making the break point not function so this is how i fixed it :D

    Friday, July 26, 2013 2:49 PM