Debugging autogenerated Sources

  • Thread starter Günter Prossliner
  • Start date
G

Günter Prossliner

Hi everybody!

The same question I have asked about one week ago in the german asp.net
newsgroup, but no one was able to answer the question. Maybe someone is able
to in this group!


I currently developing a complex framework (based on ASP.Net 2.0), witch
uses features like ExpressionBuilders and Controls with ITemplate
Properties. By using this kind of functionality, I am able to control (a
part) of the ASP.Net generated Sources.

All works fine, I have no problem with the functionality itselft. But for
debugging it would be very very nice if I could debug the code witch has
been generated. For the CLR it so absolutly no problem to debug this
sources. The problem is the directives "#line ..."

Example:

--- File "App_Web_83dzbbkx.2.cs" ---

#line 37 "F:\...\default.aspx"
@ctrl.Text = System.Convert.ToString(... my custom expression from builder,
System.Globalization.CultureInfo.CurrentCulture);

#line default
#line hidden

--- EOF ---

It is not possible to set Breakpoints into the file. Single - Step through
is also not supported.

It is also a problem to find out witch "App_Web_xxxxxxxx.cs" file is
generted from for example "default.aspx". The only way to check (i don't
call this debugging), the expression that has been generated is to but an
error into the Expression (e.g. reference a variable that doesn't exists).
Then VS.Net reports the error in the autogenerated file.


It would be very, very, very cool if source - level debugging of the
autogenerated sources would be possible. Maybe someone out there knows a
possiblity to:

* configure that ASP.Net sould avoid rendering the "#line" directives

or

* set a debugger - option so that the debugger ignores the "#line"
directives. (I think that this is not possible, becaurse the #line
directives are compiled within the .pdb, right?)


I can hardly imagine, that there is no such functionality. What about the MS
development team for ASP.Net? I think that they also need debugging -
support. I think that they are using undocumented settings / configurations.
Maybe someone from the MS Team knows!


best regards,
Guenter Prossliner
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top