I'm afraid not, Eliyahu.
Where did you read that it only applies to *.aspx files ?
See :
http://msdn2.microsoft.com/en-us/library/2fdbs127.aspx
That page explains that the *Build* configuration option which controls
whether the compilation will generate debugging information is moved
to web.config for VB.NET, C# and J#.
I don't see any exceptions there.
Additionally, that page makes clear that "If a project contains multiple configurations
(Debug compilation, Release compilation, and so on), conversion follows this logic:
If the project contains only Debug and Release configurations,
then the Debug configuration is converted to Visual Studio 2005."
That means that, since the default compilation mode is set to <compilation debug="false">
in the *Master web.config* in the CONFIG directory of the .Net Framework directory,
all you need to do to generate assemblies with debugging information is change the
web.config setting to <compilation debug="true">.
If you change that setting for one application (in its web.config), then only that application
will generate assemblies with debugging information.
If you change it at the master web.config level, all applications will generate debugging
information
( not advisable, as it will impact performace adversely ).