You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
console.trace is a really nice method for logging within functions and getting a stack-trace back to see where and how something was called. In complex workers apps, this would be very helpful.
Hello, world!
Trace: example
at example (E:\GitHub\misty-heart-08d6\example.js:5:10)
at foo (E:\GitHub\misty-heart-08d6\example.js:10:12)
at Object.<anonymous> (E:\GitHub\misty-heart-08d6\example.js:14:1)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:28:49
which when debugging can be helpful to see when/how things are called.
Describe the solution
console.trace
is a really nice method for logging within functions and getting a stack-trace back to see where and how something was called. In complex workers apps, this would be very helpful.Reference: https://developer.mozilla.org/en-US/docs/Web/API/console/trace_static
Related: cloudflare/workerd#2247
Contrived example in node.js
Outputs:
which when debugging can be helpful to see when/how things are called.
Today in Workers
Using the following script:
No errors are presented. But you also don't get any logs for the
console.trace
at all. It's seemingly just swallowed.The text was updated successfully, but these errors were encountered: