0

Is it possible to create a function interactively at the debugger interface? When I enter something like

BrightScript Debugger> function foo()

I get an error like

Syntax Error. (compile error &h02) in $LIVECOMPILE(296)

I'm guessing this is because I didn't enter the rest of the function, but I'm not sure how I could enter the rest of the function in the debugger without getting this type of error.

Ocie Mitchell
  • 1,745
  • 2
  • 12
  • 20

1 Answers1

1

You can use anonymous function to create a function in a debug console like this:

BrightScript Debugger> printFoo = function() : ? "foo" : end function

Thus, you can invoke "printFoo" just like any other function:

BrightScript Debugger> printFoo()
foo

Note that colon (":") here is used as a new line symbol since you can't write multiline statements in the debug console.

Eugene Smoliy
  • 934
  • 4
  • 9