Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add stack info to run.later call #15215

Closed
Gaurav0 opened this issue May 8, 2017 · 0 comments
Closed

Add stack info to run.later call #15215

Gaurav0 opened this issue May 8, 2017 · 0 comments

Comments

@Gaurav0
Copy link
Contributor

Gaurav0 commented May 8, 2017

This is based on a conversation I had on slack with @stefanpenner :

gmunjal [8:50 AM]
If a test is timing out, what is the best way to debug and determine what is preventing “the world from settling”?

gmunjal [8:52 AM]
Update: I put a breakpoint in the app.testHelpers.wait function, and it seems Ember.run.hasScheduledTimers() is returning true. Is there any way to determine what is scheduling a timer?

spenner [9:46 AM]
@GMunjal hmm

[9:46]
I have debugged this before, lets see if i can remember

[9:47]
for regular tasks we have a way

gmunjal [9:47 AM]
I did some stepping through hasScheduledTimers, and it was a bit complicated, but I found the backburners._timers property. Problem is it just gives a number

spenner [9:47 AM]
unsure if that way works for later tasks

[9:49]
bb._timers should also include the function

[9:49]
[0, functionFor0, 1, functionFor1, n, functionForN]

[9:49]
(not perfect, I realize)

[9:49]
in theory toString of that function may help

[9:51]
@GMunjal i think whats missing is, for run.later we don’t do the same thing we do for run.schedule and optionally save a stack: https://github.com/ebryn/backburner.js/blob/master/lib/backburner/index.js#L280
GitHub
ebryn/backburner.js
backburner.js - A rewrite of the Ember.js run loop as a generic microlibrary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant