Browse Source

Add debug interactive command

Undocumented command that enabled various debug logging and prints
number of goroutines.
Martin Hebnes Pedersen 2 years ago
parent
commit
e6f54eb34b
1 changed files with 6 additions and 0 deletions
  1. 6 0
      interactive.go

+ 6 - 0
interactive.go

@@ -8,6 +8,8 @@ import (
 	"bytes"
 	"fmt"
 	"log"
+	"os"
+	"runtime"
 	"strings"
 	"time"
 
@@ -56,6 +58,10 @@ func execCmd(line string) (quit bool) {
 		freq(param)
 	case "qtc":
 		PrintQTC()
+	case "debug":
+		os.Setenv("ardop_debug", "1")
+		os.Setenv("winmor_debug", "1")
+		fmt.Println("Number of goroutines:", runtime.NumGoroutine())
 	case "q", "quit":
 		return true
 	case "":