1
0
Fork 0

Nasal/debug.nas:backtrace(): don't truncate filename.

Truncating filenames in debug output is unhelpful.
This commit is contained in:
Julian Smith 2021-08-26 22:05:51 +01:00
parent 9f39644199
commit 89da92dd05

View file

@ -314,8 +314,6 @@ var backtrace = func(desc = nil, dump_vars = 1, skip_level = 0) {
if ((var v = caller(i)) == nil) return caller(i - 1); if ((var v = caller(i)) == nil) return caller(i - 1);
var filename = v[2]; var filename = v[2];
var line = v[3]; var line = v[3];
if (size(filename) > 50)
filename = substr(filename, 0, 5)~"[...]"~substr(filename, -40);
print(_section(sprintf("#%-2d called from %s:%d (%s) (locals %s):", print(_section(sprintf("#%-2d called from %s:%d (%s) (locals %s):",
i - skip_level, filename, line, funcname(v[1]), id(v[0])))); i - skip_level, filename, line, funcname(v[1]), id(v[0]))));
if (dump_vars) dump(v[0]); if (dump_vars) dump(v[0]);