I appear to have hit a brick wall whilst attempting to debug some C# code that resides in the App_Code folder.
We have an established ASP.NET solution and I’ve just been brought onto the team. Unfortunately when I run the code [which successfully debugs (to a certain extent)] it does not step into a *.cs file that exists in the App_Code folder.
I’ve found several posts on the subject, none of which seem relevant to me.
Specifically:
Running Win7 Enterprise 32 bit
VS2005 8.0.50727.867 (vsvista.050727-8600)
http://forums.asp.net/p/958358/3675792.aspx#3675792 mentioned removing the “+optimize” in the web.config file; this doesn’t seem to be relevant to me (<compiler language="c#;cs;csharp" extension=".cs" compilerOptions="/d:TRACE"
type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>)
The “App_Code” folder doesn’t seem to have any peculiar setting associated with it
Any pointers would be hugely appreciated.
I also said that debugging works successfully "to a certain extent". I’ve set up Visual Studio with the C# developer environment. When I hit F11 I would expect the IDE to begin debugging and for the execution point to stop on the very first line of code
(this is what it does in all my other projects in VS2003 & VS2008). However, when I hit F11 it acts like F5, running until it either hits a break point or a run-time error. I’m wondering whether this may be related to it not even hitting break-points in
code in my App_Code folder?
JGriffiths
Member
56 Points
42 Posts
Unable to debug code in App_Code folder
Feb 12, 2010 10:04 AM|LINK
I appear to have hit a brick wall whilst attempting to debug some C# code that resides in the App_Code folder.
We have an established ASP.NET solution and I’ve just been brought onto the team. Unfortunately when I run the code [which successfully debugs (to a certain extent)] it does not step into a *.cs file that exists in the App_Code folder.
I’ve found several posts on the subject, none of which seem relevant to me.
Specifically:
Any pointers would be hugely appreciated.
I also said that debugging works successfully "to a certain extent". I’ve set up Visual Studio with the C# developer environment. When I hit F11 I would expect the IDE to begin debugging and for the execution point to stop on the very first line of code (this is what it does in all my other projects in VS2003 & VS2008). However, when I hit F11 it acts like F5, running until it either hits a break point or a run-time error. I’m wondering whether this may be related to it not even hitting break-points in code in my App_Code folder?
Any and all suggestions most welcome!
Thanks in advance
Griff
debug App_Code ASP.NET 2.0 C#
chintanpshah
All-Star
19058 Points
3273 Posts
Re: Unable to debug code in App_Code folder
Feb 12, 2010 01:10 PM|LINK
If you are using Web Application project don't use App_Code. Remove folder and add forlder with name "AppCode".
My Software Website
JGriffiths
Member
56 Points
42 Posts
Re: Unable to debug code in App_Code folder
Feb 12, 2010 04:09 PM|LINK
Not sure if the AppCode solution would fix this (it's more of a web site than a web application).
The problem is that in we web.config file there had been a section with our modules in called <httpModules>.
This now needs to be copied (to remain compatible with IIS6) to a section called <system.webServer> for IIS7.