| |
microsoft.public.vsnet.debugging |
Here are the steps. Microsoft Windows XP Professional Version 2002 SP2 File->New->Web Site Add the following code to Class1.cs: public Class1() ClassLibrary1.Class1 obj = new ClassLibrary1.Class1(); Set a breakpoint on that line. Debugging Not Enabled I clicked OK (add Web.config). Edit and Continue Note that the default Build properties of ClassLibary1 do not specify Microsoft Windows XP Professional Version 2002 SP2 Microsoft Visual Studio 2005 Standard Edition Version 8.0 Microsoft .NET Framework 2.0 Microsoft Visual C# 2005 File->New->Web Site ASP.NET Web Site OK File->Add->New Project Class Library OK Add the following code to Class1.cs: public Class1() { string foo = "bar"; ClassLibrary1.Class1 obj = new ClassLibrary1.Class1(); Set a breakpoint on that line. Start debugging. The following message appears: Debugging Not Enabled The page cannot be run in debug mode because debugging is not enabled in the What would you like to do? [checked] Add a new Web.config file with debugging enabled. ! Debugging should be disabled in the Web.config file before [unchecked] Run without debugging. (Equivalent to Ctrl+F5) I clicked OK (add Web.config). Web site started running under the ASP.NET Development Server - Port 1129. Break point hit. Step into obj's constructor. Step to foo assignment. Attempt to change string. I get the following error: Edit and Continue Changes are not allowed when the debugger has been attached to an already Note that the default Build properties of ClassLibary1 do not specify > Thanks for your post. > Have you tried to create a new project in VS2005 without upgrading? Does > Best regards,
Initial setup:
Microsoft Visual Studio 2005 Standard Edition Version 8.0
Microsoft .NET Framework 2.0
Microsoft Visual C# 2005
ASP.NET Web Site
OK
File->Add->New Project
Class Library
OK
{
string foo = "bar";
Start debugging.
The following message appears:
The page cannot be run in debug mode because debugging is not enabled in the
Web.config file.
What would you like to do?
[checked] Add a new Web.config file with debugging enabled.
! Debugging should be disabled in the Web.config file before
deploying the Web site to a production environment.
[unchecked] Run without debugging. (Equivalent to Ctrl+F5)
Web site started running under the ASP.NET Development Server - Port 1129.
(Note that in my real situation I am running under IIS.)
Break point hit.
Step into obj's constructor.
Step to foo assignment.
Attempt to change string.
I get the following error:
Changes are not allowed when the debugger has been attached to an already
running process or the code being debugged is optimized.
optimized code.
Web.config file.
deploying the Web site to a production environment.
(Note that in my real situation I am running under IIS.)
running process or the code being debugged is optimized.
optimized code.
> Hi streamline,
> this problem still arise? If so, I suggest you provide some detailed steps
> to help me reproduce out this issue. Thanks
> Jeffrey Tan
> Microsoft Online Partner Support
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.