Open
Bug 1003428
Opened 11 years ago
Updated 2 years ago
Make generators inspectable
Categories
(DevTools :: Debugger, enhancement, P3)
Tracking
(Not tracked)
NEW
People
(Reporter: benjamin, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [polish-backlog])
I'd like to be able to inspect the state of an ES6 generator which is not currently running.
In particular I sometimes get Task.jsm tasks which are "stuck". I'd like to be able to take a generator associated with the task and inspect it in the debugger to see where it got stuck. jimb tells me this involves both backend work in the JS engine as well as work in the debugger, but I should file this bug and he'd help file the blocking bugs as necessary.
Comment 1•10 years ago
|
||
Benjamin, would it be useful if `Task.jsm` could be inspected to determine the line of the latest call to `yield`, or at least the number of times the task has called `yield`?
Updated•10 years ago
|
Flags: needinfo?(benjamin)
Reporter | ||
Comment 2•10 years ago
|
||
# of times is probably not useful. The line of the latest yield is useful, especially if it deals with nested functions properly.
Flags: needinfo?(benjamin)
Updated•10 years ago
|
Summary: Allow inspection of non-active generators → Make generators inspectable
Updated•10 years ago
|
Depends on: dbg-inspect
Updated•10 years ago
|
Blocks: dbg-inspect
No longer depends on: dbg-inspect
Updated•9 years ago
|
Whiteboard: [polish-backlog]
Updated•9 years ago
|
Priority: -- → P1
Comment 3•7 years ago
|
||
Clearly not a P1 anymore. Moving back to the backlog.
Yulia, maybe this is already tracked on GitHub? If not, should it be (and should this bug be closed)?
Severity: normal → enhancement
Flags: needinfo?(ystartsev)
Priority: P1 → P3
Comment 4•7 years ago
|
||
We have the ability to step over yield statements now. So, if you are on a generator, when you step you will no longer be taken into unrelated JS, instead you will step over the yield statement like any other line of code. But from the description, it isnt clear to me if this is what is required. Is there more information regarding expected behavior?
Flags: needinfo?(ystartsev)
Comment 5•7 years ago
|
||
(In reply to Yulia Startsev [:yulia] from comment #4)
> We have the ability to step over yield statements now. So, if you are on a
> generator, when you step you will no longer be taken into unrelated JS,
> instead you will step over the yield statement like any other line of code.
> But from the description, it isnt clear to me if this is what is required.
> Is there more information regarding expected behavior?
I think the original request is being able to do something like:
1. find a generator (or, now 4 years later now that we have them, async method) in the debugger source panel
2. interact with it somehow (context menu option, button in the UI elsewhere, whatever) to show:
3. where the generator/async function is "up to", so, more specifically:
-- for async functions: the current 'await' statement that has been executed but for which the promise result is pending, if any;
-- for generator functions: the last yield line from which the generator yielded a value to its caller, if any.
Both of these, by implication, indicate where the function would 'resume' either when the currently-awaited-promise resolves or when the generator is called again. Does that help clarify?
Flags: needinfo?(ystartsev)
Comment 6•7 years ago
|
||
Ok, I will add this to github to see if this is something we can fit in within the next couple of weeks. jim is right, this would take work on both the backend and the frontend.
Flags: needinfo?(ystartsev)
Updated•6 years ago
|
Product: Firefox → DevTools
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•