The stack traces shown in the Firefox Console are always empty. Am I missing something or might this be a Firefox bug?
Example JS:
function foo() {
bar()
}
function bar() {
console.trace()
}
foo()
(Using FF 59 for Ubuntu)
This is probably a bug in Firefox 59.0.2, which is already fixed in Firefox Nightly 61.0a1 (2018-04-23).
Having said that, you just need to make sure where you execute your code. When you execute your code within Scratchpad and check the results within the Browser Console, it might not work as expected. Though when you check the Web Console, the stack trace is shown correctly.
Alternatively, there is also the possibility to run your code within the browser context to get the expected results.