I am new to BlackBox Component Builder (http://blackboxframework.org/). I am experienced in Pascal, Delphi, C, C++... but I am currently in the processes of understanding the differences between these "standard" languages and Component Pascal. Tutorials are being very helpful.
One question that I have is the presence (or absence) of a runtime debugger. I tend to find breakpoints very useful to track bugs and develop code. However, I could not find how to set breakpoints in BlackBox Component Builder. In fact, I do not even know if this is possible. I searched the Documentation, Tutorials and the web, but I could not find how to stop the execution of the code at a given point, and check the current value of variables.
Is there a runtime debugger in BlackBox Component Builder? Is it possible to set breakpoints in the code execution?
Thanks in advance!
Run-time debugger in Blackbox Component Builder
- Ivan Denisov
- Posts: 362
- Joined: Tue Sep 17, 2013 12:21 am
- Location: Krasnoyarsk, Russia
Re: Run-time debugger in Blackbox Component Builder
Usually I am using HALT(0) for that purpose. The TRAP window gives you navigation for the current value of variables.
Re: Run-time debugger in Blackbox Component Builder
Thanks for the prompt answer, Ivan.
Upon your suggestion, I have tested the HALT(0). It should work for what I need. Is there a way to proceed with code execution after the halt command?
On a following question... As I understand how BlackBox works, every time I change the code of a module, I must re-compile it. For the compilation, the CTRL+K shortcut comes very handy. However, I have noticed that I must also unload the previous version of the model, through the menu Dev > Unload. Then, I must select a line with a Module.Procedure command, and execute it through the menu Dev > Execute.
I wonder if I am taking a long route (Compile + Unload + Selection + Execution), and if there is a shortcut to execute a recently updated/changed code. What are the steps that you use to test the code that you are currently developing (and changing).
Again, thanks in advance!
Upon your suggestion, I have tested the HALT(0). It should work for what I need. Is there a way to proceed with code execution after the halt command?
On a following question... As I understand how BlackBox works, every time I change the code of a module, I must re-compile it. For the compilation, the CTRL+K shortcut comes very handy. However, I have noticed that I must also unload the previous version of the model, through the menu Dev > Unload. Then, I must select a line with a Module.Procedure command, and execute it through the menu Dev > Execute.
I wonder if I am taking a long route (Compile + Unload + Selection + Execution), and if there is a shortcut to execute a recently updated/changed code. What are the steps that you use to test the code that you are currently developing (and changing).
Again, thanks in advance!
Re: Run-time debugger in Blackbox Component Builder
No, at least without using unsafe tricks.rangel wrote:Is there a way to proceed with code execution after the halt command?
There is debugger DevRemDebug, that supports breakpoints and step by step execution.
It is possible to compile and unload module with single shortcut Alt, D, A (all keys should be pressed sequentially). In Windows you can execute any menu command by pressing Alt and underlined letter key.rangel wrote:On a following question... As I understand how BlackBox works, every time I change the code of a module, I must re-compile it. For the compilation, the CTRL+K shortcut comes very handy. However, I have noticed that I must also unload the previous version of the model, through the menu Dev > Unload. Then, I must select a line with a Module.Procedure command, and execute it through the menu Dev > Execute.
I wonder if I am taking a long route (Compile + Unload + Selection + Execution), and if there is a shortcut to execute a recently updated/changed code. What are the steps that you use to test the code that you are currently developing (and changing).
Re: Run-time debugger in Blackbox Component Builder
Some another useful shortcuts:
Alt, D, D: unload selected modules (one or more).
Alt, I, S: open selected module object (like Views.View) source.
Alt, I, D: open selected module object documentation.
Alt, I, O: show log.
Alt, I, C: clear log.
Alt, I, G: show selected module global variables.
Alt, D, D: unload selected modules (one or more).
Alt, I, S: open selected module object (like Views.View) source.
Alt, I, D: open selected module object documentation.
Alt, I, O: show log.
Alt, I, C: clear log.
Alt, I, G: show selected module global variables.
- Ivan Denisov
- Posts: 362
- Joined: Tue Sep 17, 2013 12:21 am
- Location: Krasnoyarsk, Russia
Re: Run-time debugger in Blackbox Component Builder
It is easier to use Commanders to unload and run procedures. To learn how to use commanders please read ObxHello0 documentation file.rangel wrote:On a following question... As I understand how BlackBox works, every time I change the code of a module, I must re-compile it. For the compilation, the CTRL+K shortcut comes very handy. However, I have noticed that I must also unload the previous version of the model, through the menu Dev > Unload. Then, I must select a line with a Module.Procedure command, and execute it through the menu Dev > Execute.
I wonder if I am taking a long route (Compile + Unload + Selection + Execution), and if there is a shortcut to execute a recently updated/changed code. What are the steps that you use to test the code that you are currently developing (and changing).
To insert commander call Tools -> Insert commander. Use Ctrl+Commander click to unload module and run. Just Click commander to execute command after it.
To unload several modules use command ^Q DevDebug.UnloadThis MyMod1 MyMod2 MyMod3 etc. The modules should be on the reverse order of importing each other.
(^Q - is commander), you should click it to run all the command.
Also you can setup the default fonts for BlackBox in Edit -> Preferences dialog.
Re: Run-time debugger in Blackbox Component Builder
Thanks for the answer X512.X512 wrote:There is debugger DevRemDebug, that supports breakpoints and step by step execution.
I searched for this debugger, but could not find it online. Could you, please, provide a link or reference?
Thanks!
Re: Run-time debugger in Blackbox Component Builder
You can get it from here: https://github.com/romiras/BlackBox-Com ... emDebug.cp (branch feature/linref-dev-tools). This branch is extraction from "linref" distribution: https://bitbucket.org/petryxa/linref/srcrangel wrote:Thanks for the answer X512.X512 wrote:There is debugger DevRemDebug, that supports breakpoints and step by step execution.
I searched for this debugger, but could not find it online. Could you, please, provide a link or reference?
Thanks!
-
- Posts: 262
- Joined: Tue Sep 17, 2013 6:50 am
Re: Run-time debugger in Blackbox Component Builder
Does this debugger work reliably?
Is it in a shape such that it could be included in the
center distribution?
Any known bugs or limitations?
Anything like a docu?
- Josef
Is it in a shape such that it could be included in the
center distribution?
Any known bugs or limitations?
Anything like a docu?
- Josef
Re: Run-time debugger in Blackbox Component Builder
Single step is very nice but I don't miss it. There is something else which is much more helpful for debugging:
Syntax highlighting
See Go SSA HTML view at the website https://pauladamsmith.com/blog/2016/08/go-1.7-ssa.html
To get a feeling about what I'm talking move down to the line
main
Help
start
and look at the animation there.
- Helmut
Syntax highlighting
See Go SSA HTML view at the website https://pauladamsmith.com/blog/2016/08/go-1.7-ssa.html
To get a feeling about what I'm talking move down to the line
main
Help
start
and look at the animation there.
- Helmut