Re: minor debugger improvements

Daniel Dekany <[email protected]> Tue, 18 Jun 2013 18:45:36 +0200
Newsgroups gmane.comp.web.freemarker.devel
Message-ID <[email protected]>
Tuesday, June 18, 2013, 5:55:12 AM, Greg Amerson wrote:

> Do you mean like stopping at "debugger" keyword or something?

I mean, like, let's say you want to list stuff in a single *output*
line:

  <#list xs as x>...<@foo x />...</#list>

and then you want to put a break-point on the <@foo x /> instruction.
Maybe I'm just lame but I can't achieve the same thing in Eclipse with
Java, placing a break-point mid-line. But with Java it's less a
problem, because you try to format your code nicely. In a template,
however, line-breaks has impact on the output, and although you could
fix that with #t and such, it's common to do things like above. After
all you want the template to look similar to the output.

Same problem with stepping of course.

BTW, putting break-point on FTL *expressions* (as opposed to elements
aka instructions) can be a problem too, after all DebugBreak is not an
Expression. So even if the expression is in its own line, you can't
put a break point on it, right? (Furthermore there is no way of
traversing the AST deeper than on the TemplateElement-level. Not even
with internal API-s, barring reflection hacks of course. But that
could change, if for no other reason because I think I will need
that...)

-- 
Thanks,
 Daniel Dekany


> On Mon, Jun 17, 2013 at 1:43 AM, Daniel Dekany <[email protected]> wrote:
> BTW, is it possible to make stepping (and break points) not confined
> to line-starter instructions? Like is that even supported by Eclipse?
>
> --
> Thanks,
>  Daniel Dekany
>
>
> Tuesday, June 11, 2013, 9:22:55 AM, Greg Amerson wrote:
>
>> Hey Daniel,
>>
>> Actually take another quick look at my latest commit here:
>>
>> https://github.com/gamerson/freemarker/commit/92873816c0f628335998aaa92d8cf10c8f26fd77
>>
>> You will notice that I had to modify one class in the core patch,
>> DebugBreak.  I needed to be able to pass the template name to the
>> EvironmentSuspendedEvent object so that on the client I can
>> differentiate between two remote templates that have breakpoints on the exact same line.
>>
>> So I hope this minor change to core can still be merged.  Also,
>> Attila got my CLA, so I guess we can move forward.
>>
>> G
>>
>>
>> On Mon, Jun 10, 2013 at 5:47 PM, Daniel Dekany <[email protected]> wrote:
>> Monday, June 10, 2013, 5:40:37 AM, Greg Amerson wrote:
>>
>>> Hey freemarker devs,
>>>
>>> I've got an open pull request going here:
>>> https://github.com/freemarker/freemarker/pull/5
>>>
>>> Basically I need a few minor improvements to current debugging
>>> support in freemarker 2.3.x to support a new client I'm writing for
>>> Liferay IDE. I'd like to get the project leaders thoughts on what
>>> remaining tasks are necessary for us to accomplish to get the changes merged.
>>
>> Nothing, as it only affect the debug package. I'm just waiting for the
>> CLA to arrive with traditional mail, but if there's any urgency with
>> this, I don't have to wait. Is there?
>>
>> --
>> Thanks,
>>  Daniel Dekany
>>
>>>
>>> Thanks!
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> FreeMarker-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/freemarker-devel
>
>
>


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev