I think it would be very interesting to have the ability to trace(code, message) just like in the plugins.
trace with code | message
-
-
Hi,
that would be possible, but what would be the intended usage case?
Tracing debug or warning messages?
Tracing error messages will be already possible in the next release by using 'error(message, false);' - when adding the false as second parameter a normal error instead of a fatal error will be shown.
Adding an additional first parameter to the trace() action itself would break compatibility, so therefore a new action would be required - any suggestions for this? e.g. ltrace(level, ...); or debug(...); and warning(...); ?
Best regards,
Klaus -
Hi,
intended usage case, is being able to have as many traces as needed in the code for the production, and once is finished the code in order to improve performance, don't need to remove or comment the traces action, just turn them off.
So I guess debug(...) and warning(..) would be a great solution.Thanks
-
Thats a cool idea. Give traces an id, so that you can turn whole categories on and off. id's would be the way to go, so that you can trace out particular things across functions.
I guess you'd need a way to turn off on a particular id and then a method to turn them all off.
Having a color you can set for id'd traces would be sweet as well.Also, I'd like to short the syntax to that if you trace a string it shows the string and value automatically. Would save a ton of typing.
STRACE: layer[sacha].x= 5strace because s is for sacha.
:) -
Adding an additional first parameter to the trace() action itself would break compatibility, so therefore a new action would be required - any suggestions for this? e.g. ltrace(level, ...); or debug(...); and warning(...); ?i second that request too...
atm i use my own js_trace(code, ...) to allow a green "debug:" line
but to have debug(), warning() would be nicer
maybe even better would be dtrace(code, ...) working the same as the js krpano.trace()a global variable debug= false could then suppress all debug/warning outputs
-
Adding an additional first parameter to the trace() action itself would break compatibility, so therefore a new action would be required - any suggestions for this? e.g. ltrace(level, ...); or debug(...); and warning(...); ?i second that request too...
atm i use my own js_trace(code, ...) to allow a green "debug:" line
but to have debug(), warning() would be nicer
maybe even better would be dtrace(code, ...) working the same as the js krpano.trace()a global variable debug= false could then suppress all debug/warning outputs
-
Hi,
for debugging complex tours, I use selfmade tracer
it displays two types of information:
- continuous tracing preset variables (amount - up to 6) is set at startupCodecheck_1(keycode); check_2(view.vlookat); check_3(layer[skin_map].state); check_4(layer[skin_map].visible); check_5(layer[skin_thumbs].state); check_6(my_var_to_trace);
- signal when predefined action is executed to trace a value up to two variables
for example, tracing some of the actions in the vtourskin.xmlCode
Display More<action name="skin_keydown_event"> if(keycode == 33, skin_nextscene_loop(-1) ); <!-- Page Up - previous scene --> if(keycode == 34, skin_nextscene_loop(+1) ); <!-- Page Dowm - next scene --> if(keycode == 35, skin_gotoscene(calc(scene.count-1)) ); <!-- End - last scene --> if(keycode == 36, skin_gotoscene(0) ); <!-- Home/Pos1 - first scene --> <!-- trace action name and the value of keycode in yellow --> checkaction(%0,get(keycode),ye); <!-- end of trace --> </action> ... <action name="skin_showmap"> <!-- trace action name in green --> checkaction(%0,,gr); <!-- end of trace --> if(%1 == null, if(layer[skin_map].state == 'closed', set(show,true), set(show,false)); , set(show,%1); ); mul(mh, layer[skin_scroll_layer].pixelheight, -1); ...
Enabling/disabling tracing is made from the address bar like the following
Codehttp://3dpano.by/parkhotel/patio/test/index.html?check=true http://3dpano.by/parkhotel/patio/test/index.html?check=false or http://3dpano.by/parkhotel/patio/test
Example trace standard krpano tour you can look at this link
-
Hi,
there are now (1.19-pr6) these actions:
debug()
trace()
warning()
error()
fatalerror()
for having more levels and more control about the trace output.Best regards,
Klaus
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!