Skip to content

Load zone.js long-stack-trace in debug mode #2233

@vicb

Description

@vicb

dist/long-stack-trace-zone.min.js should be loaded in the development environment to give more meaningful stack traces.

Without this script, only the last VM turn is logged. When this script is loaded the stack will contain all VM turns from the point the async operation was initiated.

note the script should be loaded after zone.js

/ref angular/angular#11722

  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
    n/a
  2. Versions. Please run ng --version. If there's nothing outputted, please run
    in a Terminal: node --version and paste the result here:
    angular-cli: 1.0.0-beta.14
    node: 6.6.0
    os: darwin x64
  3. Repro steps. Was this an app that wasn't created using the CLI? What change did you
    do on your code? etc.

add throw new Error('test') in any async code (ie a component constructor).
The stack trace is incomplete, only show the last sync chunk of code.

  1. The log given by the failure. Normally this include a stack trace and some
    more information.

see angular/angular#11722 for more info

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions