Menu

#319 Only top-level template is returned in DebuggedEnvironment

open
nobody
None
5
2010-07-20
2010-07-20
No

Adding a breakpoint to the debugger allows adding a breakpoint to any template at a particular line number. However, when DebuggerListener.environmentSuspended is called, only the line and the DebuggedEnvironment is returned as part of the event. However, the DebuggedEnvironment doesn't return the currently executing template from the "template" key. Instead, it returns only the top-level template, which could be including the template that has the breakpoint in it. Therefore, when writing a debugger plugin for an IDE, it's impossible to point the IDE to the correct template and line number without guessing.

There are a couple of potential solutions to this problem:
1. Pass the currently executing template name back with the EnvironmentSuspendedEvent. This seems like the most useful solution since it will be very specific.
2. Return the entire call stack back as part of the DebuggedEnvironment object (maybe as part of the "templateCallStack" key).

Ideally we'd be able to get both of these so we could show variables at each scope of the call stack.

Discussion


Log in to post a comment.