This is awesome!
Even before the file/line info was in the backtraces, they helped me
track down issue in 3.4->wafflecone porting.
Thanks!
-e
P T Withington wrote:
As of r6361 of Wafflecone, backtraces now include file and line
information. This should make it much easier to track down the source
of your errors and warnings. You must turn on backtraces in the
developer console to get this feature.
When backtraces are on, all debugger messages will have a backtrace
associated with them and the debugger message will automatically
display the file and line information from the top 'user' (non-LFC)
frame in the backtrace. This information will _usually_ be useful,
but you may still need to inspect the message and expand the backtrace
in the message to find your problem.
For example, running smokecheck, you will see:
ERROR @lzunit/lzunit.lzx#382: Expected: expected 'undefined value'
got {}
Which reports a line in the lzunit component. This is where lzunit
reports the error, but not the actual source of the error; it is the
first non-LFC frame. To find the actual source of the error, click on
the error message to inspect it:
lzx> Debug.inspect(«#LzError#1| ERROR @lzunit/lzunit.lzx#382...»)
«#LzError#1#101| ERROR @lzunit/lzunit.lzx#382: Expected: expected
'undefined value' got {}» {
backtrace: #LzError <- format <- assertUndefined <- testFailures <-
runTest <- run
file: 'lzunit/lzunit.lzx'
line: 382
message: "Expected: expected 'undefined value' got {}"
}
ERROR @lzunit/lzunit.lzx#382: Expected: expected 'undefined value'
got {}
And then click on the backtrace to inspect it:
lzx> Debug.inspect(«Backtrace(19)| #LzError <- format <- ass...»)
«Backtrace(19)#143| #LzError <- format <- assertUndefined <-
testFailures <- runTest <- run» {
length: 19
0: kernel/LzIdleKernel.lzs#29/16 @lfc/kernel/LzIdleKernel.lzs#32
1: #__idleupdate @lfc/services/LzIdle.lzs#103
2: sendEvent @lfc/events/LaszloEvents.lzs#452
3: checkQ @lfc/services/LzInstantiator.lzs#155
4: makeSomeViews @lfc/services/LzInstantiator.lzs#166
5: makeChild @lfc/core/LzNode.lzs#1022
6: makeChild @lfc/core/LzNode.lzs#1022
7: kernel/LzIdleKernel.lzs#29/16 @lfc/kernel/LzIdleKernel.lzs#32
8: #__idleupdate @lfc/services/LzIdle.lzs#103
9: sendEvent @lfc/events/LaszloEvents.lzs#446
10: removeCallIdleDelegates @lfc/services/LzIdle.lzs#67
11: execute @lfc/events/LaszloEvents.lzs#95
12: runNextTest @lzunit/lzunit.lzx#1148
13: run @lzunit/lzunit.lzx#632
14: runTest @lzunit/lzunit.lzx#668
15: testFailures @lzunit-test.lzl#494
16: assertUndefined @lzunit/lzunit.lzx#499
17: format @lzunit/lzunit.lzx#382
18: #LzError @lfc/debugger/LzMessage.lzs#439
}
#LzError <- format <- assertUndefined <- testFailures <- runTest <- run
Where you can see that the actual source of the error is in frame 15.