ErosOlmi
06-04-2008, 00:36
Be sure to have at least thinBasic preview version 1.6.0.4 installed before testing this module
_________________________________________________
I am experimenting a new module called TRACE. This module will let you:
trace script execution line by line
inspect and change script variables value during execution
setting breakpoints
... other things
In reality I'm still very far from the above list but I wanted to show what's going on here.
How to use:
download attached file
substitute thinCore.dll you have in \thinBasic\ directory with the attached one
place thinBasic_Trace* files into \thinBasic\Lib\ directory
Done that, you can start tracing your first script just adding:
USES "TRACE"
as first line of your script. This line will invoke new TRACE module. A new window will appear (see attached image) and script will stop at every line.
We are developing TRACE as module and not as native thinAir tool because we are adding to thinBasic Core engine some new function interfaces that will let everybody to develop its own Tracing tools exactly like we are doing now. So everyone knowing how to develop a thinBasic module in whatvever compiled language will be able to develop its own methods to interact with script execution. Done that, we will integrate tracing functionalities directly into thinAir.
For the moment PLEASE JUST TRACE VERY SIMPLE SCRIPTS AND do not trace any script working with UI module because otherwise you will enter a never ending sequence: messages to close windows will never be handled (in case, use TaskManager and stop thinBasic.exe process).
Module is not tested much, interaction is very very minimal but I feel confident I will get something usefull from this job.
Of course obfuscated scripts cannot be traced. For the moment if you try you will get a GPF but in next version you will get a runtime error.
Let me know what you think, any evident bugs or just ideas.
I will keep into consideration during development.
Ciao
Eros
Updates:
2008.04.06: removed messagebox. Added F8 (execute line) and CTRL+F8 (execute up to cursor position). Much more usable
2008.04.13: big improvements in Trace module user interface and possibilities: single line steps, execute, break points, variable inspection
2008.04.14: traced script is now shown with its original comments and indentations
_________________________________________________
I am experimenting a new module called TRACE. This module will let you:
trace script execution line by line
inspect and change script variables value during execution
setting breakpoints
... other things
In reality I'm still very far from the above list but I wanted to show what's going on here.
How to use:
download attached file
substitute thinCore.dll you have in \thinBasic\ directory with the attached one
place thinBasic_Trace* files into \thinBasic\Lib\ directory
Done that, you can start tracing your first script just adding:
USES "TRACE"
as first line of your script. This line will invoke new TRACE module. A new window will appear (see attached image) and script will stop at every line.
We are developing TRACE as module and not as native thinAir tool because we are adding to thinBasic Core engine some new function interfaces that will let everybody to develop its own Tracing tools exactly like we are doing now. So everyone knowing how to develop a thinBasic module in whatvever compiled language will be able to develop its own methods to interact with script execution. Done that, we will integrate tracing functionalities directly into thinAir.
For the moment PLEASE JUST TRACE VERY SIMPLE SCRIPTS AND do not trace any script working with UI module because otherwise you will enter a never ending sequence: messages to close windows will never be handled (in case, use TaskManager and stop thinBasic.exe process).
Module is not tested much, interaction is very very minimal but I feel confident I will get something usefull from this job.
Of course obfuscated scripts cannot be traced. For the moment if you try you will get a GPF but in next version you will get a runtime error.
Let me know what you think, any evident bugs or just ideas.
I will keep into consideration during development.
Ciao
Eros
Updates:
2008.04.06: removed messagebox. Added F8 (execute line) and CTRL+F8 (execute up to cursor position). Much more usable
2008.04.13: big improvements in Trace module user interface and possibilities: single line steps, execute, break points, variable inspection
2008.04.14: traced script is now shown with its original comments and indentations