Debugging console
[1/2] from: sanghabum::aol::com at: 5-Dec-2001 5:10
Here's a simple idea, and a simple script to go with it.
With View, you are either running your Layouts, and
wondering why Things Aren't Right, or you've stopped
the application and are Printing away at the console
to see what's up.
So why not have a debug window that lets you type
commands as the application runs?
== save as (eg) debug.r ============
rebol [title: "Debug window"]
view/new/offset layout [
DebugCommand: field 300
Button "Do it" [
print DebugCommand/text
use [ErrorCode] [
errorcode: copy []
if error? ErrorCode: try [do DebugCommand/text ""][
print mold disarm ErrorCode
] ;if
print "======================="
] ; use
] ; action
] ; layout
(system/view/screen-face/size / 2) ; offset on screen
==============
Sample usage:
unview/all
do %debug.r
...
...run your application
--Colin.
[2/2] from: brett:codeconscious at: 6-Dec-2001 13:22
> So why not have a debug window that lets you type
> commands as the application runs?
Clever debugging idea. :)
Thanks
Brett.