John Barton (2014-03-28T16:41:30.000Z)
domenic at domenicdenicola.com (2014-03-30T16:15:35.563Z)
Notice that the `eval` stack trace is not very useful in the common case that the buffer is more complex than a single line and the `eval` is called more than once. For `eval`, `new Function()`, `document.write(<script>)`, `document.appendChild(<script>)`, and `System.module()` successful debugging -- and thus stack traces -- require unique, stable names for the buffers. With these names, debugging with these features is no different than normal source; without names, stack traces have limited value. Stable automatic naming is difficult, since the code that uses these features often does so inside of asynchronous loops (for loading). Making it easy for developers to provide names is the simplest improvement for these dynamic features. We could have names provided to `eval()` and `new Function();` we should ensure that new API has names, like `System.module()`. That would make a standard stack trace more useful.