From 5cfae0536f8499634c2fa2eba9a71fec1c0d417b Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 10 Jun 2015 21:09:12 +0200 Subject: [PATCH] cmd/evm: print trace when running programs --- cmd/evm/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/evm/main.go b/cmd/evm/main.go index 599721c89e..7c9d27fac9 100644 --- a/cmd/evm/main.go +++ b/cmd/evm/main.go @@ -59,6 +59,7 @@ func main() { logger.AddLogSystem(logger.NewStdLogSystem(os.Stdout, log.LstdFlags, logger.LogLevel(*loglevel))) + vm.Debug = true db, _ := ethdb.NewMemDatabase() statedb := state.New(common.Hash{}, db) sender := statedb.CreateAccount(common.StringToAddress("sender")) @@ -80,6 +81,8 @@ func main() { fmt.Println(string(statedb.Dump())) } + vm.StdErrFormat(vmenv.StructLogs()) + var mem runtime.MemStats runtime.ReadMemStats(&mem) fmt.Printf("vm took %v\n", time.Since(tstart))