Click to See Complete Forum and Search --> : Breakpoint is not working in my website (asp.net 2.0)??
kkrish
February 23rd, 2009, 03:22 PM
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
dglienna
February 23rd, 2009, 11:53 PM
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
eclipsed4utoo
February 24th, 2009, 08:42 AM
are you running the application? try using F5 to build & run.
breakpoints do work in ASP.Net.
kkrish
February 24th, 2009, 09:05 AM
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?
eclipsed4utoo
February 25th, 2009, 08:49 AM
in your web.config file, check to see if you have this...
<system.web>
<compilation debug="true">
.........
.........
.........
</system.web>
kkrish
February 25th, 2009, 11:55 AM
in your web.config file, check to see if you have this...
<system.web>
<compilation debug="true">
.........
.........
.........
</system.web>
yup...it is set to true in web.config
Alsvha
February 25th, 2009, 04:29 PM
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?
eclipsed4utoo
February 26th, 2009, 07:30 AM
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?
kkrish
February 26th, 2009, 07:50 AM
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
kkrish
February 26th, 2009, 07:54 AM
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....
raghavendrap
May 21st, 2009, 06:41 AM
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: 2raghavendra@gmail.com
eclipsed4utoo
May 27th, 2009, 09:53 AM
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: 2raghavendra@gmail.com
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.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.