diff --git a/src/webinspector/webkitDebugProxy.go b/src/webinspector/webkitDebugProxy.go index 83fe49b..25228ac 100644 --- a/src/webinspector/webkitDebugProxy.go +++ b/src/webinspector/webkitDebugProxy.go @@ -19,7 +19,7 @@ func SetIsAdapter(flag bool) { isAdapter = flag } -func InitWebInspectorServer(udid string, port int, isDebug bool) context.CancelFunc { +func InitWebInspectorServer(udid string, port int, isProtocolDebug bool, isDTXDebug bool) context.CancelFunc { var err error var cannel context.CancelFunc if webDebug == nil { @@ -33,8 +33,10 @@ func InitWebInspectorServer(udid string, port int, isDebug bool) context.CancelF } } localPort = port - if isDebug { + if isProtocolDebug { SetProtocolDebug(true) + } + if isDTXDebug { giDevice.SetDebug(true, true) } return cannel @@ -73,15 +75,6 @@ func PageDebugHandle(c *gin.Context) { return } defer conn.Close() - // - //file := "./" +"message"+ ".txt" - //logFile, err := os.OpenFile(file, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0766) - //if err != nil { - // panic(err) - //} - //log.SetOutput(logFile) // 将文件设置为log输出的文件 - //log.SetPrefix("[qSkipTool]") - //log.SetFlags(log.LstdFlags | log.Lshortfile | log.LUTC) err = webDebug.StartCDP(application.ApplicationID, page.PageID, conn) if err != nil {