CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 12 of 12
  1. #1
    Join Date
    Feb 2009
    Posts
    20

    Breakpoint is not working in my website (asp.net 2.0)??

    Hi,

    Can anyone tell me why breakpoint is not hitting in my website. I am using visual studio 2005 and trying to write code in C# (asp.net 2.0).

    Its a simple code to see whether breakpoint is work or not. I am just trying to print text entered in a textbox when i click on a button. when i run below code and click on button after entering the text in textbox it is displaying it on label instead of taking me to the line where i inserted the breakpoint!!

    protected void Button1_Click(object sender, EventArgs e)
    {
    String mystring;
    mystring = TextBox1.Text;
    Label1.Text = mystring;
    }

    point to notice is that, when i tried writing C++ programs in the same VS2005, breakpoints worked fine without any problem.

    Can anyone please tell me what i am doing wrong?

    Thanks
    Kkrish

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Breakpoint is not working in my website (asp.net 2.0)??

    The code is running on the client, so there's no value it being able to break execution. Theres nothing that you'd want the client to do
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Nov 2007
    Location
    .NET 3.5 / VS2008 Developer
    Posts
    624

    Re: Breakpoint is not working in my website (asp.net 2.0)??

    are you running the application? try using F5 to build & run.

    breakpoints do work in ASP.Net.

  4. #4
    Join Date
    Feb 2009
    Posts
    20

    Re: Breakpoint is not working in my website (asp.net 2.0)??

    eclipsed4utoo....I tried f5....it didnt work!

    dglienna....do you think that breakpoint will work if i write different code!!....but in my application, client should enter text in the text box and click on the button-------then the breakpoint should get called(this is where i placed breakpoint)---so...what's wrong?

  5. #5
    Join Date
    Nov 2007
    Location
    .NET 3.5 / VS2008 Developer
    Posts
    624

    Re: Breakpoint is not working in my website (asp.net 2.0)??

    in your web.config file, check to see if you have this...

    Code:
    <system.web>
        <compilation debug="true">
    
        .........
        .........
        .........
    </system.web>

  6. #6
    Join Date
    Feb 2009
    Posts
    20

    Re: Breakpoint is not working in my website (asp.net 2.0)??

    Quote Originally Posted by eclipsed4utoo View Post
    in your web.config file, check to see if you have this...

    Code:
    <system.web>
        <compilation debug="true">
    
        .........
        .........
        .........
    </system.web>
    yup...it is set to true in web.config

  7. #7
    Join Date
    Feb 2005
    Location
    Denmark
    Posts
    742

    Re: Breakpoint is not working in my website (asp.net 2.0)??

    Are you compiling to release mode?
    I can't remember if that prevents attaching the debugger to the code, but I do believe it causes problems at least.

    And sorry for asking the obvious - you aren't trying to debug the site from another server, meaning you want to debug locally the deployed solution?

  8. #8
    Join Date
    Nov 2007
    Location
    .NET 3.5 / VS2008 Developer
    Posts
    624

    Re: Breakpoint is not working in my website (asp.net 2.0)??

    Quote Originally Posted by Alsvha View Post
    Are you compiling to release mode?
    I can't remember if that prevents attaching the debugger to the code, but I do believe it causes problems at least.

    And sorry for asking the obvious - you aren't trying to debug the site from another server, meaning you want to debug locally the deployed solution?
    compiling and running in release mode does not prevent debugging.

    to the OP, when you hit F5, what happens? Does it build and a new window of Internet Explorer popup?

  9. #9
    Join Date
    Feb 2009
    Posts
    20

    Re: Breakpoint is not working in my website (asp.net 2.0)??

    Quote Originally Posted by eclipsed4utoo View Post
    compiling and running in release mode does not prevent debugging.

    to the OP, when you hit F5, what happens? Does it build and a new window of Internet Explorer popup?
    yes, a new window of IE pops up....i enter text in the text box and hit the button but instead of showing me the execution i.e. taking me to the line where i placed breakpoint....prints the text in the label

  10. #10
    Join Date
    Feb 2009
    Posts
    20

    Re: Breakpoint is not working in my website (asp.net 2.0)??

    Quote Originally Posted by Alsvha View Post
    Are you compiling to release mode?
    I can't remember if that prevents attaching the debugger to the code, but I do believe it causes problems at least.

    And sorry for asking the obvious - you aren't trying to debug the site from another server, meaning you want to debug locally the deployed solution?
    nope....i am compiling in debug mode.

    yes....i am running this program on my laptop...both client and server on same machine....

  11. #11
    Join Date
    May 2009
    Posts
    1

    Re: Breakpoint is not working in my website (asp.net 2.0)??

    Press F5 to start in debugging mode,
    and then go to debug -> Attach to Process and select WebDev.WebServer.EXE,
    now refresh the page and go ahead with debugging.

    Raghavendra Padanad
    mail_id: [email protected]
    Last edited by raghavendrap; May 21st, 2009 at 06:41 AM. Reason: spell check

  12. #12
    Join Date
    Nov 2007
    Location
    .NET 3.5 / VS2008 Developer
    Posts
    624

    Re: Breakpoint is not working in my website (asp.net 2.0)??

    Quote Originally Posted by raghavendrap View Post
    Press F5 to start in debugging mode,
    and then go to debug -> Attach to Process and select WebDev.WebServer.EXE,
    now refresh the page and go ahead with debugging.

    Raghavendra Padanad
    mail_id: [email protected]
    this should be done automatically. I know it does for me.

    if the OP reads this, right click on your web project, then go to Properties. Go to the "Web" tab, and make sure the "ASP.Net" is checked in the "Debuggers" section.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured