Giter Club home page Giter Club logo

Comments (7)

kibiz0r avatar kibiz0r commented on July 17, 2024 1

That's a great idea. zone.js is probably a good inspiration, too.

from c-sharp-promise.

ashleydavis avatar ashleydavis commented on July 17, 2024

Sounds like a good idea. Although not sure how we'd achieve that in C#. Got any ideas?

from c-sharp-promise.

zsoi avatar zsoi commented on July 17, 2024

I like the idea, too - one could record stack traces manually via the StackTrace class, and then pass traces to the next promise. But sounds like a pretty complicated task, and I'd guess that selectively activating/deactivating the feature may be not so easy to accomplish, because it sounds like a lot of overhead processing. Would it be possible to let "debuggable promises" inherit from the default implementation?

from c-sharp-promise.

bendangelo avatar bendangelo commented on July 17, 2024

Any update on this? It would be very useful.

from c-sharp-promise.

RoryDungan avatar RoryDungan commented on July 17, 2024

We currently don't have any plans to implement this feature ourselves but would be happy to merge it if someone can figure out an implementation that doesn't break any existing code.

from c-sharp-promise.

TinyTeaTree avatar TinyTeaTree commented on July 17, 2024

What would a long stack trace look like compare to what we got today?

Currently you get different stack traces on code invoked from the resolver if you resolved after the callbacks were set, or if the callbacks where set after the Promise was resolved.

from c-sharp-promise.

timcassell avatar timcassell commented on July 17, 2024

FYI I have this working in my ProtoPromise library. The steps are to capture the current stack trace whenever a new Promise is created. Set that trace to the currently running trace before the callback is executed (in a [ThreadStatic] field). When the stack trace is captured, append it to a list of all the previous stack traces (I store it in a CausalityTrace class that handles it cleanly).

from c-sharp-promise.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.