Skip to content

Commit

Permalink
优化adapter细节
Browse files Browse the repository at this point in the history
  • Loading branch information
aoliaoaoaojiao committed Sep 17, 2022
1 parent 4e96120 commit 88271cf
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions src/webinspector/webkitDebugProxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 88271cf

Please sign in to comment.