Stack traces are not displayed in DevTools in an obvious way

By design Issue #10868717

Details

Created
Feb 8, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
  • Internet Explorer
Found in build #
14.14393
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

Summary:

Edge prints errors in a way that hides stack traces and requires a lot of operations to display them to the developer. This impacts AngularJS which is now considering UA-sniffing to serve Edge special code so we (the AngularJS team) would appreciate the fix.

Details:

If you log a throw error in the console, e.g.:
try {
throw new Error(‘message’);
catch (error) {
console.error(error);
}
all you’ll see is a message with an arrow to expand the object. Only after expanding you can see the stack field but it only displays the beginning of the stack; you have to click on the field to expand it. This means the developer needs two clicks to get to the stack trace.

If you also log a string in the same console method invocation, e.g.:
console.error(error, aString);
Edge displays the error message and aString concatenated in the first line but only upon expanding it it displays the error object that you see from the beginning if error is logged separately. This means 3 clicks are needed to see the stack trace. This is a situation that would happen in AngularJS if we didn’t UA-sniff Edge to serve it different code.

I’ve attached screenshots to show all the steps required currently in Edge to see the stack trace.

Background:

Currently AngularJS formats the stack trace of caught errors by itself and prints it to the console. This means browsers that implemented mapping stack traces back to original files along provided source maps (currently Chrome & Safari) don’t detect the error as an error and don’t apply any formatting. That’s why we’re planning to remove the formatting and just print the error object directly; Chrome & Safari are then applying source maps. Firefox doesn’t but it still prints the stack trace directly to the console (no expanding required) so its situation doesn’t get worse. Only IE & Edge are problematic here.

Attachments

Comments and activity

  • Microsoft Edge Team

    Changed Assigned To to “Andy S.”

    Changed Status to “Confirmed”

    Changed Status from “Confirmed” to “By design”

  • Thanks for the feedback. Not showing stack traces is a limitation in the current F12 tools. We’ll look at improving it in a future version. There’s a UserVoice item tracking the scenario over at: https://wpdev.uservoice.com/forums/257854-microsoft-edge-developer/suggestions/6225641-call-stacks-for-messages please vote on it there.

  • OK, we’ll UA-sniff for Edge to print a formatted stack trace for now then.

You need to sign in to your Microsoft account to add a comment.

Sign in