Feature #187

adding a run-time debugger to BlackBox

Added by J. Templ about 1 year ago. Updated 12 months ago.

Status:ClosedStart date:05/15/2018
Priority:NormalDue date:
Assignee:J. Templ% Done:

0%

Category:-
Target version:1.7.2
Forum topic:https://forum.blackboxframework.org/viewtopic.php?f=41&t=716

Description

It is proposed to add a run-time debugger for BlackBox.
A prototype of such a debugger is available from Oberon microsystems
and has been adapted to BlackBox 1.7 by oberoncore.
It is based on the Windows debugging API and is able to set code
and data breakpoints, do single step execution and more.
However, the user interface needs improvements and various changes
made in the post-mortem debugger since BlackBox 1.6 need to be applied
also to the run-time debugger.

Proposed by J. Templ, 2018-05-15.

Associated revisions

Revision 66f28131
Added by J. Templ about 1 year ago

adding a run-time debugger to BlackBox. Refs: #187.
Technically based on a prototype by ominc, which has been ported to BB1.7 by oberoncore, plus:
- improved user interface: debugger is attached to running BB, no flickering, tool dialog, etc.
- internationalized
- relevant DevDebug changes since BB1.6 applied to RTDebug.

Also fixes an error in ShowArray, where the type of variable vi has been changed from SHORTINT to INTEGER in issue-#19.
This variable is used for reading 2-byte characters and must be reset to SHORTINT.

Signed-off-by: Josef Templ <>

Revision ca5b3448
Added by J. Templ about 1 year ago

bug fixed in extraction of startupDir and exeName. Refs: #187.
By using WinApi.GetFullPathName we get an absolute path name for the startupDir even if it is empty,
and a simplification of the code.

Signed-off-by: Josef Templ <>

Revision a56090e1
Added by J. Templ 12 months ago

Strings resource SourceCodeBtn added. Refs: #187.

Signed-off-by: Josef Templ <>

Revision ff53eb6c
Added by J. Templ 12 months ago

commands for attaching a debugger moved into separate module DevDebugCmds. Refs: #187.
Plus some internal code cleanups.

Note: it has been observed that the 'Stop' button does no longer work in most cases.
There have not been any related changes, thus the only explanation so far is that a Windows
version upgrade introduced the problem.

Signed-off-by: Josef Templ <>

Revision b01283fd
Added by J. Templ 12 months ago

work around added for problem with DevRTDebug.Stop. Refs: #187.
This version of Stop uses a retry loop. It is a work around a problem probably introduced
by a recent Windows 10 update. It seems that setting the trace flag is ignored when
the process is executing a certain part of the Windows library code. Therefore Stop does not
always work at the first attempt. So we retry until it works or it times out.

Signed-off-by: Josef Templ <>

Revision 341fe4b9
Added by J. Templ 12 months ago

debug tool renamed, Stop and docu improved. Refs: #187.
WinApi.DebugBreakProcess added.
Stop now uses WinApi.DebugBreakProcess instead of setting the trace flag.
This stops the debugged thread reliably even with the latest upgrade of Win10.

Signed-off-by: Josef Templ <>

Revision a7b618d9
Added by J. Templ 12 months ago

command OpenSourceCode refined. Refs: #187.
If a module name is selected in the focus text,
a source window is opened for the selected module or brought to front.
The source file is looked up according to the debugged process.

Signed-off-by: Josef Templ <>

Revision 6c0f9892
Added by J. Templ 12 months ago

Docu improved. Refs: #187.

Signed-off-by: Josef Templ <>

Revision 0be720c0
Added by J. Templ 12 months ago

DevCebugCmds.RegisterDebugger added, docu improved. Refs: #187.

Signed-off-by: Josef Templ <>

Revision f1bbfca7
Added by J. Templ 12 months ago

docu improved, debug commands internationalized. Refs: #187.

Signed-off-by: Josef Templ <>

Revision d4fbae91
Added by J. Templ 12 months ago

docu improved. Refs: #187.

Signed-off-by: Josef Templ <>

Revision 052dc2e9
Added by J. Templ 12 months ago

the debugger now uses registry key 'BlackBox Debugger' consistently. Refs: #187.

Signed-off-by: Josef Templ <>

Revision 7b76f095
Added by J. Templ 12 months ago

Windows registry used for configuring the debugger. Refs: #187.
The command line registered with DevDebugCmds.RegisterDebugger as well as the layout of the core debugger windows are now saved in the registry.
Small cleanups, fixes, and docu improvements.

Signed-off-by: Josef Templ <>

Revision 38cc160b
Added by J. Templ 12 months ago

Windows registry used for configuring the debugger. Refs: #187.
The command line registered with DevDebugCmds.RegisterDebugger as well as the layout of the core debugger windows are now saved in the registry.
Small cleanups, fixes, and docu improvements.

Signed-off-by: Josef Templ <>

Revision 778e1f19
Added by J. Templ 12 months ago

DevReferences.ResolveImportAlias used for resolving import aliases. Refs: #187.
Plus automatic reopening of 'Remote Source' window when needed.
DevDebugCmds.DbgCmds simplified.

Signed-off-by: Josef Templ <>

Revision 1dcb5f49
Added by J. Templ 12 months ago

code cleanup. Refs: #187.

Signed-off-by: Josef Templ <>

Revision 19b731eb
Added by J. Templ 11 months ago

warning added for usage under wine. Refs: #187.
docu improved.
Stop implemented the old way when used under wine.

Signed-off-by: Josef Templ <>

Revision 6d4a4916
Added by J. Templ 11 months ago

adaptations for run-time debugging under wine. Refs: #187.
Plus 'Step Out' functionality added to 'Continue To' if there is no caret found.

Signed-off-by: Josef Templ <>

Revision 8ad95998
Added by J. Templ 11 months ago

adding a run-time debugger to BlackBox. Refs: #187.
Technically based on a prototype by ominc, which has been ported to BB1.7 by oberoncore, X512, Ivan, etc.
Plus:
- improved user interface: debugger is attached to running BB, no flickering, tool dialog, etc.
- debugger uses its own registry settings and saves core window layout
- internationalized
- relevant DevDebug changes since BB1.6 applied to RTDebug
- debugger works also under wine and latest Windows 10 update
- docu added.

Also fixes an error in DevDebug.ShowArray, where the type of variable vi has been changed from SHORTINT to INTEGER in issue-#19.
This variable is used for reading 2-byte characters and must be reset to SHORTINT.

Signed-off-by: Josef Templ <>

Revision f575addc
Added by J. Templ 11 months ago

Merge pull request #205 from BlackBoxCenter/issue-#187

adding a run-time debugger to BlackBox. Refs: #187.

History

#1 Updated by J. Templ 12 months ago

  • Forum topic set to https://forum.blackboxframework.org/viewtopic.php?f=41&t=716

#2 Updated by J. Templ 12 months ago

  • Status changed from New to Closed

Also available in: Atom PDF