debug
This commit is contained in:
@@ -126,6 +126,7 @@ func (r *REPL) Exec(f io.Reader) (state *VMState) {
|
||||
state.constants = code.Constants
|
||||
|
||||
machine := vm.NewWithGlobalState(code, state.globals)
|
||||
machine.Debug = r.opts.Debug
|
||||
err = machine.Run()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Woops! Executing bytecode failed:\n %s\n", err)
|
||||
@@ -206,6 +207,7 @@ func (r *REPL) StartExecLoop(in io.Reader, out io.Writer, state *VMState) {
|
||||
state.constants = code.Constants
|
||||
|
||||
machine := vm.NewWithGlobalState(code, state.globals)
|
||||
machine.Debug = r.opts.Debug
|
||||
err = machine.Run()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Woops! Executing bytecode failed:\n %s\n", err)
|
||||
|
||||
Reference in New Issue
Block a user