Cannot Debug a LPT

Posts   
 
    
Paddy
User
Posts: 20
Joined: 07-Jun-2007
# Posted on: 12-Jul-2007 20:25:03   

Hi there,

I’m trying to debug a template engine (.lpt) without success. Yes, the process is attached and I enter in debug mode, stopping at the following line of the DotNetTemplateEngine class:

templateObject.___RUN(executingGenerator, parameters, outputWriter, null);

…what I assume is correct. So from here if I press F5 or step into/over the code, it seems to have no effect; the code runs without stopping inside the template; it justs runs till the finally (outputWriter.Close())

I’ve read several posts about this and tried many of the solutions already posted but no luck so far.

Here’s what I did:

1.Create a .lpt with <[ System.Diagnostics ]> at the beginning and a <% Debugger.Break(); %> somewhere in the code.

2.Create a task (.tasks file) with the DotNetTemplateEngine task performer.

3.Create a debug preset with debugBuild=true and templateAssemblySourceFileFormat= templateClassesSource.[extension]

4.Create a template bindings for the .lpt

5.I generate the code, the breakpoint is hit and I always get the previously mentioned behaviour (along with a headache simple_smile ).

What I can’t find is any .pdb file. I checked in c:\temp\GeneratorTemp but nothing, so I wonder if this file is generated by the template studio when compiling .lpt’s or when generating the code (F7) .

I spent a morning trying to make it work, please, any help will be welcomed!

Thank you very much.

Attachments
Filename File size Added on Approval
Files.zip 2,265 12-Jul-2007 20:29.12 Approved
Walaa avatar
Walaa
Support Team
Posts: 14987
Joined: 21-Aug-2005
# Posted on: 13-Jul-2007 10:17:41   

So from here if I press F5 or step into/over the code, it seems to have no effect; the code runs without stopping inside the template; it justs runs till the finally (outputWriter.Close())

Did you mean "press F10"?

So it does not stop where you have placed the "<% Debugger.Break(); %>", correct?

Paddy
User
Posts: 20
Joined: 07-Jun-2007
# Posted on: 13-Jul-2007 14:38:16   

F5 ("Continue" till you hit a breakpoint when entering in debug mode) or F10 does the same thing.

Yep, it does not stop there; it stops at templateObject.___RUN() and pressing F10 or F11 next line that will be executed will be: base.AddNewLogNode(...) It's like I said, it's like just debugging DotNetTemplateEngine class.

For the moment I'm using (very) old ways of debugging: MessageBox.Show(...) sunglasses but if you find out what I doing wrong I'll greatly appreciate it.

Take care.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39774
Joined: 17-Aug-2003
# Posted on: 14-Jul-2007 12:49:10   

It's due to the fact how lpt templates are compiled. Please see this thread, it discusses the same issue: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=9191

I'll file a bug to the templatestudio project so the v2.5 compatible version will have a feature which compiles the templates regardless of the debug flag of the first task.

Frans Bouma | Lead developer LLBLGen Pro
Paddy
User
Posts: 20
Joined: 07-Jun-2007
# Posted on: 16-Jul-2007 15:14:33   

Thanks! Have a nice day.