Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Debugging console

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.