Standardized stack trace

Is there any plan to standardize Error.prototype.stack? I would like to see this standardized along side a second, new API: Error.prototype.asyncStack. The latter would be just like the former, but include async stack frames as well. I would also like to see another new API added to it: Error.prototype.setStackDepth to allow for some control over the number of stack frame entries.

This is this proposal which attempts to standardize the things that implementations are already consistently doing. It also provides a couple of new stack-related functions. But from what I understand, it makes no attempt to actually standardize the contents of the "stack" property, only the fact that such a property exists.

1 Like

That's correct. If we can get everyone on board to pin down a more deterministic stack spec, such a proposal can follow this one. IOW, this proposal seeds the ground for getting more agreement on stacks over time.

2 Likes