issue-#187 adding a run-time debugger to BlackBox

Merged to the master branch

Re: issue-#187 adding a run-time debugger to BlackBox

Postby Josef Templ » Thu Jun 07, 2018 9:49 am

Well, Doug, this is almost the same. Isn't it clear what "It" refers to?
The problem with the proposed change is that there are 3 sentences starting with "The run-time debugger",
which to me doesn't sound good.

In general I agree that the user manual part may be improved. Some text from the developer manual could be copied or moved to the user manual.
The reason for its brevity is that I didn't want to make structural changes in the user manual such as introducing a new section for run-time debugging.
Therefore I kept it short, a single paragraph at the end of the debugging section. I also didn't want to over stress the importance of
run-time debugging because in other parts of the docu it is claimed that post mortem debugging is enough.
There is already a link to DevDebugCmds in the user manual, which gives additional info.

- Josef
User avatar
Josef Templ
 
Posts: 2011
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#187 adding a run-time debugger to BlackBox

Postby DGDanforth » Thu Jun 07, 2018 9:58 am

Josef Templ wrote:Well, Doug, this is almost the same. Isn't it clear what "It" refers to?
The problem with the proposed change is that there are 3 sentences starting with "The run-time debugger",
which to me doesn't sound good.

In general I agree that the user manual part may be improved. Some text from the developer manual could be copied or moved to the user manual.
The reason for its brevity is that I didn't want to make structural changes in the user manual such as introducing a new section for run-time debugging.
Therefore I kept it short, a single paragraph at the end of the debugging section. I also didn't want to over stress the importance of
run-time debugging because in other parts of the docu it is claimed that post mortem debugging is enough.
There is already a link to DevDebugCmds in the user manual, which gives additional info.

- Josef

My point was to remove any references to "process"
The run-time debugger is another BlackBox process that is attached as a debugger to the running BlackBox process.


The user does not care about the implementation details of the debugger but only wants to debug their source code. The implementation
should be a blackbox.

Doug
User avatar
DGDanforth
 
Posts: 1061
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, California, USA

Re: issue-#187 adding a run-time debugger to BlackBox

Postby Robert » Thu Jun 07, 2018 11:09 am

I have downloaded build 1033, and I am still not getting this (the fact I've misplaced my glasses probably doesn't help!).
The run-time debugger can be activated with the commands Dev->Debug Command and Dev->Debug Module after selecting a command or module name in a text document.

Is this referring to Menu Commands?
If so, either these Commands should be in the provided "Dev" menu, or there should be explicit instructions what to add yourself to the menu Text . I think the first option is preferable.

DevDebugCmds says:
For operating the debugger please see the Help text of the Debug tool opened in the attached debugger process.
I have not yet been able to open this Debug tool. But I think it would be helpful to have a direct blue link here to this Text.

I think the reference to "BlackBox processes" in the User Manual should either be deleted or explained.

Robert
User avatar
Robert
 
Posts: 994
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: issue-#187 adding a run-time debugger to BlackBox

Postby Josef Templ » Thu Jun 07, 2018 12:45 pm

> Is this referring to Menu Commands?
> If so, either these Commands should be in the provided "Dev" menu, or there should be explicit instructions what to add yourself to the menu Text .

The mentioned commands are in menu Devindeed, at least that is the intention.
Look at the two bottom-most commands.
Are you using your own Dev menu file (with private modifications) or the one bundled in the download?

> I have not yet been able to open this Debug tool. But I think it would be helpful to have a direct blue link here to this Text.

The Debug tool is opened automatically inside the debugger application when the debugger is started.
If it is not opened, then something is wrong.
Probably it is not opened because in your case the debugger is not started at all.

- Josef
User avatar
Josef Templ
 
Posts: 2011
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#187 adding a run-time debugger to BlackBox

Postby Josef Templ » Thu Jun 07, 2018 1:56 pm

DGDanforth wrote:The user does not care about the implementation details of the debugger but only wants to debug their source code. The implementation
should be a blackbox.

Doug


It' s not that simple. The user will see two processes (applications) when using the run-time debugger
and he should understand the meaning of those two applications.
This cannot be hidden from the user.

But I have refined the wording a bit now. Hopefully it's going into the right direction.
The Dev/Docu/User.Man now has subsections for Post-mortem Debugging and Run-time Debugging
and some of the text is moved from DevDebugCmds docu to the user manual.

The diffs are https://redmine.blackboxframework.org/projects/blackbox/repository/diff?utf8=%E2%9C%93&rev=d4fbae91cbad23428c8ce0b12607358f9e3e6f9f&rev_to=f1bbfca794bacbb82ee8be07857497d2bb76b569.

The latest version is http://blackboxframework.org/unstable/issue-%23187/blackbox-1.7.2-a1.1034.zip.

- Josef
User avatar
Josef Templ
 
Posts: 2011
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#187 adding a run-time debugger to BlackBox

Postby Robert » Fri Jun 08, 2018 8:36 am

Josef Templ wrote:Are you using your own Dev menu file (with private modifications) or the one bundled in the download?

Aaargh - scream! I thought of that, I thought I had checked it, but, obviously, I got that wrong. It all works now.

I think the wording in build 1034 is much better.

I have now voted (in support!).

Two points though (only one actually relevant to this issue). When the debugger instance opens its main window it is the same size as the original instance's main window. Could it have its own size parameters which it remembers from use to use?

The other point is a suggestion for a new feature regarding menu customisation. We can replace entire system menu files by having our own copy (in this case D:\BlackBoxClient\Dev\Rsrc\Menus.odc replaces D:\BlackBox\1034_187\Dev\Rsrc\Menus.odc). But, I think, it would be helpful to have a mechanism to only delete or insert specific lines into the system menu. In this case I added the lines
SEPARATOR
"Insert Left" "*F5" "DevSelectors.DepositLeft; StdCmds.PasteView" "StdCmds.PasteViewGuard"
"Insert Middle" "*F6" "DevSelectors.DepositMiddle; StdCmds.PasteView" "StdCmds.PasteViewGuard"
"Insert Right" "*F7" "DevSelectors.DepositRight; StdCmds.PasteView" "StdCmds.PasteViewGuard"

Obviously the details need to be worked out. If people think this suggestion is interesting I could give it some more thought.
User avatar
Robert
 
Posts: 994
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: issue-#187 adding a run-time debugger to BlackBox

Postby Josef Templ » Fri Jun 08, 2018 12:58 pm

> When the debugger instance opens its main window it is the same size as the original instance's main window. Could it have its own size parameters which it remembers from use to use?

Yes, that's possible with the latest version.
It required some additional code in HostRegistry but I think it's worth it.
Actually it is a cleanup over the previous version where the Dialog.appName has been set at
an inappropriate place/time leading to a mix of using registry keys from BlackBox and from the debugger.

Now the debugger uses its own registry settings consistently.
If the debugger application is named 'BlackBox Debugger', which is defined in Dev/Rsrc/Strings,
the registry settings are under the key 'BlackBox Debugger', a sibling of the application key ('BlackBox').
When there are no debugger registry entries, some values (MainWindow, language, default fonts)
are inherited, if available.

Please download the latest version from http://blackboxframework.org/unstable/issue-%23187/blackbox-1.7.2-a1.1035.zip.

For the diffs see https://redmine.blackboxframework.org/projects/blackbox/repository/diff?utf8=%E2%9C%93&rev=052dc2e92de86f24b4eb5dd0725079b53115b1c6&rev_to=d4fbae91cbad23428c8ce0b12607358f9e3e6f9f.

- Josef
User avatar
Josef Templ
 
Posts: 2011
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#187 adding a run-time debugger to BlackBox

Postby Robert » Sat Jun 09, 2018 9:54 pm

A curious bug?

I open a source code file, select the Module name at the top, click Dev->Debug Module.
The debugger opens, and has a window with a copy of the source code.

But, in this copy, the default Ruler is missing!
User avatar
Robert
 
Posts: 994
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: issue-#187 adding a run-time debugger to BlackBox

Postby Josef Templ » Sat Jun 09, 2018 10:56 pm

Robert wrote:A curious bug?

I open a source code file, select the Module name at the top, click Dev->Debug Module.
The debugger opens, and has a window with a copy of the source code.

But, in this copy, the default Ruler is missing!


Thanks for the hint.
The default ruler and attributes must be copied explicitly in addition to copying the text contents.
I will add this in the next version.

BTW, to me it is a strange concept that the defaults are stored outside the text model, viz. in the text view.
But this can of course not be changed, so we have to work around this behavior.

- Josef
User avatar
Josef Templ
 
Posts: 2011
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#187 adding a run-time debugger to BlackBox

Postby Robert » Sun Jun 10, 2018 7:56 am

Is it worth extending the Guard on "Global Variables" to call TextCmds.SelectionGuard?
User avatar
Robert
 
Posts: 994
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

PreviousNext

Return to Resolved (Features)

Who is online

Users browsing this forum: No registered users and 0 guests