CN114490378A - Page debugging method and device, electronic equipment and computer readable storage medium - Google Patents

Page debugging method and device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN114490378A
CN114490378A CN202210082439.8A CN202210082439A CN114490378A CN 114490378 A CN114490378 A CN 114490378A CN 202210082439 A CN202210082439 A CN 202210082439A CN 114490378 A CN114490378 A CN 114490378A
Authority
CN
China
Prior art keywords
debugging
page
terminal
communication channel
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210082439.8A
Other languages
Chinese (zh)
Inventor
张恒敏
王兆麒
彭彦鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202210082439.8A priority Critical patent/CN114490378A/en
Publication of CN114490378A publication Critical patent/CN114490378A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The method comprises the steps that a first terminal sends a debugging prompt message to a second terminal through a server to prompt a page supporting debugging in a target application in the first terminal to the second terminal, the server receives a debugging request of the second terminal to the page, the first terminal obtains a debugging result of the page based on the debugging request and returns the debugging result of the page to the second terminal, and therefore in the debugging process of the webpage, the first terminal and the second terminal do not need to use a USB connecting line, data transmission is carried out between the first terminal and the second terminal through the server, and remote debugging is achieved.

Description

Page debugging method and device, electronic equipment and computer readable storage medium
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a page debugging method and apparatus, an electronic device, and a computer-readable storage medium.
Background
With the development of terminal technology, an Application (APP) running in a terminal can embed a page by using a web view (Webview), so that the terminal displays the page of the Application through the web view, and the page of the Application can also be debugged by other terminals.
In the related art, taking a Personal Computer (PC) as an example for debugging a page of an application program in a mobile phone, a process of page debugging includes: the mobile phone is connected with the PC through a Universal Serial Bus (USB) connecting line, and the PC can debug the page of the application program in the mobile phone based on the USB connection between the PC and the mobile phone.
In the process of page debugging, the PC and the mobile phone need to be connected by a USB connecting line, the connection is limited by the length of the USB connecting line, and once the distance between the PC and the mobile phone exceeds the length of the USB connecting line, the PC cannot debug the page of the application program in the mobile phone.
Disclosure of Invention
The disclosure provides a page debugging method, a page debugging device, electronic equipment and a computer readable storage medium, so as to at least solve the problem that once the distance between a PC and a mobile phone exceeds the length of a USB connecting line, the PC cannot debug a page of an application program in the mobile phone in the related art. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, a page debugging method is provided, which is applied to a first terminal, and the method includes:
responding to debugging prompt operation of a first page in a target application, and sending a debugging prompt message to a second terminal through a server, wherein the debugging prompt message is used for prompting that the first page in the target application supports debugging;
Receiving a debugging request of the second terminal from the server, wherein the debugging request is used for indicating debugging of the first page;
acquiring a debugging result of the first page based on the debugging request;
and sending the debugging result of the first page to the second terminal through the server.
In a possible implementation manner, the webpage view mounted on the first page corresponds to a first communication channel, and the first communication channel is a communication channel between an operating system of the first terminal and a webpage view kernel;
the obtaining of the debugging result of the first page based on the debugging request comprises:
sending the debugging request to the webpage view kernel through the first communication channel corresponding to the webpage view, and debugging the first page by the webpage view kernel based on the debugging request to obtain a debugging result of the first page;
and receiving a debugging result of the first page sent by the debugging front end through the first communication channel corresponding to the webpage view.
In one possible embodiment, the method further comprises:
responding to debugging prompt operation of a first page in a target application, and acquiring a webpage view for mounting the first page;
And creating the first communication channel corresponding to the webpage view.
In one possible embodiment, the creating the first communication channel corresponding to the web page view includes:
responding to debugging prompt operation of a first page in a target application, and acquiring address information of the first page, wherein the address information comprises an identifier of the webpage view;
creating a first communication channel between the operating system and the web page view kernel;
and establishing a corresponding relation between the address information and the established first communication channel.
In one possible implementation manner, the obtaining address information of a first page in response to a debugging prompt operation on the first page in a target application includes:
responding to a debugging prompt operation of a first page in a target application, and sending an address acquisition request to a webpage view kernel, wherein the address acquisition request is used for indicating to acquire address information of a page which supports debugging and is mounted in a webpage view in the target application;
receiving address information of at least one second page from the web page view kernel;
and inquiring the address information of the first page from the address information of the at least one second page based on the identification of the webpage view.
In one possible embodiment, the first communication channel is a local socket; the method further comprises the following steps:
updating the communication protocol of the first communication channel from the hypertext transfer protocol to a network socket protocol;
the sending the debugging request to the web page view kernel through the first communication channel corresponding to the web page view comprises:
and sending the debugging request to the first communication channel through the network socket protocol.
In one possible embodiment, the method further comprises:
receiving a container state acquisition request of the second terminal from the server, wherein the container state acquisition request is used for indicating to acquire state data of the webpage view mounted on the first page;
acquiring state data of the webpage view based on the container state acquisition request;
and sending the state data of the webpage view to the second terminal through the server.
In one possible embodiment, the method further comprises:
receiving a container performance acquisition request of the second terminal from the server, wherein the container performance acquisition request is used for indicating to acquire performance data of the webpage view mounted on the first page;
Acquiring performance data of the webpage view based on the container performance acquisition request;
and sending the performance data of the webpage view to the second terminal through the server.
In one possible embodiment, the performance data of the web page view includes an amount of resources occupied by the web page view;
the acquiring performance data of the webpage view based on the container performance acquiring request comprises:
and acquiring the resource amount occupied by the webpage view from a memory analysis tool in a webpage browser kernel of the first terminal based on the container performance acquisition request.
In one possible embodiment, the method further comprises:
receiving an application performance acquisition request of the second terminal from the server, wherein the application performance acquisition request is used for indicating to acquire performance data of the target application;
acquiring performance data of the target application based on the application performance acquisition request;
and sending the performance data of the target application to the server through the server.
In one possible implementation, the performance data of the target application includes an amount of resources occupied by the target application;
The acquiring performance data of the target application based on the application performance acquisition request comprises:
and acquiring the resource amount occupied by the target application from the debugging memory information class in the operating system of the first terminal based on the application performance acquisition request.
In one possible embodiment, the method further comprises:
responding to a debugging prompt operation of a first page in a target application, injecting a target script into a page code of the first page, executing a debugging request of the second terminal received from the server by the target script, acquiring a debugging result of the first page based on the debugging request, and sending the debugging result of the first page to the second terminal through the server.
In a possible implementation manner, the target script includes an information module and a target hijacking module, the target hijacking module includes a target hijacking method, and the target hijacking method is used for providing a page debugging function for an operating system of the first terminal;
the target script receives a debugging request of the second terminal from the server, and the obtaining of the debugging result of the first page based on the debugging request comprises:
The information module receives a debugging request of the second terminal from the server through the second communication channel;
the information module sends the debugging request to the target hijack module;
and the target hijacking module acquires the debugging result of the first page based on the received debugging request and the target hijacking method.
In a possible implementation, the target script includes at least one agent module and at least one specific hijacking module, each agent module corresponds to one specific hijacking module, each specific hijacking module includes a specific hijacking method, and each specific hijacking method is used for providing a page debugging function for an operating system;
the target hijacking module is one of the at least one specific hijacking module, and the target hijacking module corresponds to a target agent module in the at least one agent module;
the step of sending the debugging request to the target hijacking module by the information module comprises the following steps:
the information module sends the debugging request to the target agent module;
and the target agent module receives the debugging request and sends the received debugging request to the target hijack module.
In a possible implementation manner, the target hijacking module is a public hijacking module in the target script, the target hijacking method is a public hijacking method included in the public hijacking module, the public hijacking method is used for providing a page debugging function, and the page debugging function is applicable to various operating systems.
In a possible implementation manner, the webpage view mounted on the first page corresponds to a second communication channel, and the second communication channel is a communication channel between the server and the target script;
the target script receiving the debugging request of the second terminal from the server comprises:
the target script receives a debugging request of the second terminal from the server through the second communication channel;
the sending, by the target script through the server, the debugging result of the first page to the second terminal includes:
and the target script sends the debugging result of the first page to the server through the second communication channel, and the server sends the debugging result of the first page to the second terminal.
According to a second aspect of the embodiments of the present disclosure, there is provided a page debugging method applied to a server, the method including:
Receiving a debugging prompt message from the first terminal, wherein the debugging prompt message is used for prompting that a first page in a target application of the first terminal supports debugging;
sending the debugging prompt message to a second terminal through a third communication channel, wherein the third communication channel corresponds to a main panel of the second terminal, and the main panel is used for providing a function of processing the debugging prompt message;
receiving a debugging request of the second terminal through a fourth communication channel, wherein the debugging request is used for indicating to debug the first page, the fourth communication channel corresponds to a debugging panel of the second terminal, and the debugging panel is used for providing a page debugging function;
sending a debugging request of the second terminal to the first terminal;
receiving a debugging result of the first page from the first terminal;
and sending the debugging result of the first page to the second terminal through the fourth communication channel.
In one possible embodiment, the server includes a channel management module, an information flow module, and a first controller, where the first controller corresponds to a communication channel between the server and the first terminal;
Receiving a debugging request of the second terminal through a fourth communication channel; sending the debug request of the second terminal to the first terminal comprises:
the channel management module receives a debugging request of the second terminal through a fourth communication channel and sends the debugging request to the information flow module;
and the information flow module sends the debugging request to the first controller according to the debugging request, and the first controller informs the channel management module to send the debugging request to a communication channel between the server and the first terminal.
In a possible implementation manner, a plurality of communication channels exist between the server and the second terminal, the server includes a channel management module, an information flow module, and a plurality of second controllers, and the plurality of second controllers respectively correspond to the plurality of communication channels;
the receiving of a debugging prompt message from the first terminal; sending the debug prompt message to the second terminal through a third communication channel includes:
the channel management module receives a debugging prompt message from the first terminal and sends the debugging prompt message to the information flow module;
And the information flow module sends the debugging prompt message to a second controller corresponding to the third communication channel in the plurality of communication channels according to the debugging prompt message, and the second controller informs the channel management module to send the debugging prompt message to the third communication channel.
In a possible implementation manner, a plurality of communication channels exist between the server and the second terminal, the server includes a channel management module, an information flow module, and a plurality of second controllers, and the plurality of second controllers respectively correspond to the plurality of communication channels;
the debugging result of the first page is received from the first terminal; sending the debugging result of the first page to the second terminal through the fourth communication channel comprises:
the channel management module receives the debugging result of the first page from the first terminal and sends the debugging result to the information flow module;
and the information flow module sends the debugging result to a second controller corresponding to the fourth communication channel in the plurality of communication channels according to the debugging result, and the second controller informs the channel management module to send the debugging result to the fourth communication channel.
In one possible embodiment, the method further comprises:
receiving a container state acquisition request of the second terminal through a fifth communication channel, wherein the container state acquisition request is used for indicating to acquire state data of the webpage view mounted on the first page, the fifth communication channel corresponds to an attribute panel of the second terminal, and the attribute panel is used for providing a function of the webpage view state;
sending the container state acquisition request to the first terminal;
receiving state data of the webpage view from the first terminal;
and sending the state data of the webpage view to the second terminal through a fifth communication channel.
In a possible implementation manner, a plurality of communication channels exist between the server and the second terminal, the server includes a channel management module, an information flow module, and a plurality of second controllers, and the plurality of second controllers respectively correspond to the plurality of communication channels;
the state data of the webpage view is received from the first terminal; sending the state data of the web page view to the second terminal through a fifth communication channel comprises:
the channel management module receives the state data from the first terminal and sends the state data to the information flow module;
And the information flow module sends the state data to a second controller corresponding to the fifth communication channel in the plurality of communication channels according to the state data, and the second controller informs the channel management module to send the state data to the fifth communication channel.
In one possible embodiment, the method further comprises:
receiving a container performance acquisition request of the second terminal through a fifth communication channel, wherein the container performance acquisition request is used for indicating to acquire performance data of the webpage view mounted on the first page, the fifth communication channel corresponds to an attribute panel of the second terminal, and the attribute panel is used for providing a function of webpage view performance;
sending the container performance acquisition request to the first terminal;
receiving performance data of the webpage view from the first terminal;
and sending the performance data of the webpage view to the second terminal through the fifth communication channel.
In a possible implementation manner, a plurality of communication channels exist between the server and the second terminal, the server includes a channel management module, an information flow module, and a plurality of second controllers, and the plurality of second controllers respectively correspond to the plurality of communication channels;
The performance data of the webpage view is received from the first terminal; sending the performance data of the web page view to the second terminal through a fifth communication channel comprises:
the channel management module receives the performance data from the first terminal and sends the performance data to the information flow module;
and the information flow module sends the performance data to a second controller corresponding to a fifth communication channel in the plurality of communication channels according to the performance data, and the second controller informs the channel management module to send the performance data to the fifth communication channel.
In one possible embodiment, the method further comprises:
receiving an application performance acquisition request of the second terminal through a fifth communication channel, wherein the application performance acquisition request is used for indicating to acquire performance data of the target application, the fifth communication channel corresponds to an attribute panel of the second terminal, and the attribute panel is used for providing a function of the performance of the target application;
sending the application performance acquisition request to the first terminal;
receiving performance data of the target application from the first terminal;
And sending the performance data of the target application to the second terminal through the fifth communication channel.
In a possible implementation manner, a plurality of communication channels exist between the server and the second terminal, the server includes a channel management module, an information flow module, and a plurality of second controllers, and the plurality of second controllers respectively correspond to the plurality of communication channels;
the receiving of performance data of the target application from the first terminal; sending, to the second terminal through the fifth communication channel, the performance data of the target application includes:
the channel management module receives the performance data from the first terminal and sends the performance data to the information flow module;
and the information flow module sends the performance data to a second controller corresponding to a fifth communication channel in the plurality of communication channels according to the performance data, and the second controller informs the channel management module to send the performance data to the fifth communication channel.
According to a third aspect of the embodiments of the present disclosure, there is provided a page debugging method applied to a second terminal, the method including:
Receiving a debugging prompt message of a first terminal sent by a server through a third communication channel, wherein the debugging prompt message is used for prompting that a first page in a target application of the first terminal supports debugging, the third communication channel corresponds to a main panel of a second terminal, and the main panel is used for providing a function of processing the debugging prompt message;
responding to debugging operation of the first page, and sending a debugging request to the server through a fourth communication channel, wherein the debugging request is used for indicating debugging of the first page, the fourth communication channel corresponds to a debugging panel of the second terminal, and the debugging panel is used for providing a page debugging function;
and receiving the debugging result of the first page sent by the server through the fourth communication channel.
In one possible embodiment, the sending a debug request to the server through a fourth communication channel in response to the debug operation on the first page includes:
displaying debugging options and address information of the first page carried by the debugging prompt message in the main panel;
responding to the selection operation for the debugging option in the main panel, and displaying the debugging panel, wherein the debugging panel comprises a debugging function option which is used for providing a function for generating the debugging request;
And responding to the selection operation of the debugging function option, and sending the debugging request to the server through a fourth communication channel.
In one possible implementation, the main panel further includes an attribute acquisition option, and the attribute acquisition option corresponds to the address information, and the method further includes:
responding to the selection operation of the attribute acquisition option, displaying an attribute panel of the first page, wherein the attribute panel is used for providing a function of a webpage view state, and comprises a container state acquisition option;
responding to the selection operation of the container state acquisition option, and sending a container state acquisition request to the server through a fifth communication channel, wherein the container state acquisition request is used for indicating to acquire state data of the webpage view mounted on the first page;
and receiving the state data of the webpage view sent by the server through the fifth communication channel.
In one possible embodiment, after receiving the status data of the web page view sent by the server through the fifth communication channel, the method further includes:
displaying, in the property panel, status data of the web page view.
In one possible implementation, the property panel is further used for providing a function of web page view performance, and the property panel further comprises a container performance acquisition option; the method further comprises the following steps:
responding to the selection operation of the container performance acquisition option, and sending a container performance acquisition request to the server through the fifth communication channel, wherein the container performance acquisition request is used for indicating to acquire performance data of the webpage view mounted on the first page;
and receiving the performance data of the webpage view sent by the server through the fifth communication channel.
In one possible embodiment, after receiving, through the fifth communication channel, the performance data of the web page view sent by the server, the method further includes:
in the property panel, performance data of the web page view is displayed.
In one possible implementation, the property panel is further used for providing a function of the performance of the target application, and the property panel further comprises an application performance acquisition option; the method further comprises the following steps:
responding to the selection operation of the application performance acquisition option, and sending an application performance acquisition request to the server through the fifth communication channel, wherein the application performance acquisition request is used for indicating to acquire the performance data of the target application;
And receiving the performance data of the target application sent by the server through the fifth communication channel.
In one possible implementation, after receiving, through the fifth communication channel, the performance data of the target application sent by the server, the method further includes:
in the property panel, performance data of the target application is displayed.
In one possible embodiment, the property panel further includes a real time panel, and the real time panel is used for showing a real time corresponding to the property data of the page, and the method further includes:
and displaying the real time corresponding to the attribute data of the first page in a real time panel.
In one possible embodiment, the property panel further comprises an offline package panel, the offline package panel is used for providing offline page code of the first page, the offline package panel comprises a running option, and the running option is used for providing a function of running the offline page code; the method further comprises the following steps:
and in response to the selection operation of the operation option in the offline package panel, executing the offline page code of the first page.
In a possible implementation manner, after the receiving, through the fourth communication channel, the debugging result of the first page sent by the server, the method further includes:
and displaying the debugging result of the first page in the debugging panel.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a page debugging apparatus applied to a first terminal, the apparatus including:
the first sending unit is configured to execute a debugging prompt operation responding to a first page in a target application, and send a debugging prompt message to a second terminal through a server, wherein the debugging prompt message is used for prompting that the first page in the target application supports debugging;
a receiving unit configured to execute receiving, from the server, a debugging request of the second terminal, the debugging request being used for instructing debugging of the first page;
an obtaining unit configured to perform obtaining a debugging result of the first page based on the debugging request;
and the second sending unit is also configured to send the debugging result of the first page to the second terminal through the server.
In a possible implementation manner, the web view mounted on the first page corresponds to a first communication channel, and the first communication channel is a communication channel between an operating system of the first terminal and a web view kernel; the acquisition unit is configured to perform:
Sending the debugging request to the webpage view kernel through the first communication channel corresponding to the webpage view, and debugging the first page by the webpage view kernel based on the debugging request to obtain a debugging result of the first page;
and receiving a debugging result of the first page sent by the debugging front end through the first communication channel corresponding to the webpage view.
In a possible embodiment, the apparatus further comprises a creating unit;
the obtaining unit is further configured to execute a debugging prompt operation responding to a first page in a target application, and obtain a webpage view used for mounting the first page;
the creating unit is configured to create the first communication channel corresponding to the webpage view.
In one possible embodiment, the creating unit includes:
the acquisition subunit is configured to execute to respond to a debugging prompt operation of a first page in a target application and acquire address information of the first page, wherein the address information comprises an identifier of the webpage view;
a creating subunit configured to perform creating a first communication channel between the operating system and the web view kernel;
The creating subunit is further configured to perform to establish a correspondence between the address information and the created first communication channel.
In one possible implementation, the acquisition subunit is configured to perform:
responding to a debugging prompt operation of a first page in a target application, and sending an address acquisition request to a webpage view kernel, wherein the address acquisition request is used for indicating to acquire address information of a page which supports debugging and is mounted in a webpage view in the target application;
receiving address information of at least one second page from the web page view kernel;
and inquiring the address information of the first page from the address information of the at least one second page based on the identification of the webpage view.
In one possible embodiment, the first communication channel is a local socket; the device further comprises:
an updating unit configured to perform updating of a communication protocol of the first communication channel from a hypertext transfer protocol to a web socket protocol;
the second sending unit is further configured to execute sending the debugging request to the first communication channel through the network socket protocol.
In a possible implementation manner, the receiving unit is further configured to execute receiving, from the server, a container state obtaining request of the second terminal, where the container state obtaining request is used to instruct to obtain state data of a web page view mounted on the first page;
the acquisition unit is further configured to execute acquiring the state data of the webpage view based on the container state acquisition request;
the second sending unit is further configured to execute sending, by the server, the status data of the web page view to the second terminal.
In a possible implementation manner, the receiving unit is further configured to execute receiving, from the server, a container performance obtaining request of the second terminal, where the container performance obtaining request is used to instruct to obtain performance data of a web page view mounted on the first page;
the obtaining unit is further configured to execute obtaining performance data of the webpage view based on the container performance obtaining request;
the second sending unit is further configured to execute sending, by the server, the performance data of the web page view to the second terminal.
In one possible embodiment, the performance data of the web page view includes an amount of resources occupied by the web page view;
the acquiring unit is further configured to execute the container performance acquiring request to acquire the resource amount occupied by the web page view from a memory analysis tool in a web browser kernel of the first terminal.
In a possible implementation manner, the receiving unit is further configured to perform receiving, from the server, an application performance obtaining request of the second terminal, where the application performance obtaining request is used to instruct to obtain performance data of the target application;
the obtaining unit is further configured to execute obtaining performance data of the target application based on the application performance obtaining request;
the second sending unit is further configured to execute sending, by the server, the performance data of the target application to the server.
In one possible implementation, the performance data of the target application includes an amount of resources occupied by the target application;
the obtaining unit is further configured to execute obtaining of the resource amount occupied by the target application from a debug memory information class in an operating system of the first terminal based on the application performance obtaining request.
In one possible embodiment, the apparatus further comprises:
and the injection unit is configured to execute a step of responding to a debugging prompt operation of a first page in a target application, injecting a target script into the page code of the first page, executing a debugging request of the second terminal received from the server by the target script, acquiring a debugging result of the first page based on the debugging request, and sending the debugging result of the first page to the second terminal through the server.
In a possible implementation manner, the webpage view mounted on the first page corresponds to a second communication channel, and the second communication channel is a communication channel between the server and the target script;
the target script receiving the debugging request of the second terminal from the server comprises:
the target script receives a debugging request of the second terminal from the server through the second communication channel;
the sending, by the target script through the server, the debugging result of the first page to the second terminal includes:
and the target script sends the debugging result of the first page to the server through the second communication channel, and the server sends the debugging result of the first page to the second terminal.
In a possible implementation manner, the target script includes an information module and a target hijacking module, the target hijacking module includes a target hijacking method, and the target hijacking method is used for providing a page debugging function for an operating system of the first terminal; the target script receives a debugging request of the second terminal from the server, and the obtaining of the debugging result of the first page based on the debugging request comprises:
the information module receives a debugging request of the second terminal from the server through the second communication channel;
the information module sends the debugging request to the target hijack module;
and the target hijacking module acquires the debugging result of the first page based on the received debugging request and the target hijacking method.
In a possible implementation, the target script includes at least one agent module and at least one specific hijacking module, each agent module corresponds to one specific hijacking module, each specific hijacking module includes a specific hijacking method, and each specific hijacking method is used for providing a page debugging function for an operating system;
The target hijacking module is one of the at least one specific hijacking module, and the target hijacking module corresponds to a target agent module in the at least one agent module;
the step of sending the debugging request to the target hijacking module by the information module comprises the following steps:
the information module sends the debugging request to the target agent module;
and the target agent module receives the debugging request and sends the received debugging request to the target hijack module.
In a possible implementation manner, the target hijacking module is a public hijacking module in the target script, the target hijacking method is a public hijacking method included in the public hijacking module, the public hijacking method is used for providing a page debugging function, and the page debugging function is applicable to various operating systems.
According to a fifth aspect of the embodiments of the present disclosure, there is provided a page debugging apparatus applied to a server, the apparatus including:
a receiving unit configured to perform receiving a debugging prompting message from the first terminal, wherein the debugging prompting message is used for prompting that a first page in a target application of the first terminal supports debugging;
A sending unit configured to execute sending the debugging prompt message to a second terminal through a third communication channel, where the third communication channel corresponds to a main panel of the second terminal, and the main panel is used for providing a function of processing the debugging prompt message;
the receiving unit is further configured to execute receiving, through a fourth communication channel, a debugging request of the second terminal, where the debugging request is used to instruct to debug the first page, the fourth communication channel corresponds to a debugging panel of the second terminal, and the debugging panel is used to provide a function of page debugging;
the sending unit is further configured to execute sending of a debugging request of the second terminal to the first terminal;
the receiving unit is further configured to receive the debugging result of the first page from the first terminal;
the sending unit is further configured to send the debugging result of the first page to the second terminal through the fourth communication channel.
In one possible embodiment, the server includes a channel management module, an information flow module, and a first controller, where the first controller corresponds to a communication channel between the server and the first terminal;
The receiving unit is further configured to execute receiving a debugging request of the second terminal through a fourth communication channel based on the channel management module, and sending the debugging request to the information flow module;
the sending unit is further configured to execute sending the debugging request to the first controller based on the information flow module according to the debugging request, and the first controller informs the channel management module to send the debugging request to a communication channel between the server and the first terminal.
In a possible implementation manner, a plurality of communication channels exist between the server and the second terminal, the server includes a channel management module, an information flow module, and a plurality of second controllers, and the plurality of second controllers respectively correspond to the plurality of communication channels;
the receiving unit is further configured to execute receiving a debugging prompt message from the first terminal based on the channel management module, and sending the debugging prompt message to the information flow module;
the sending unit is further configured to execute sending the debugging prompt message to a second controller corresponding to the third communication channel in the plurality of communication channels based on the information flow module according to the debugging prompt message, and the second controller notifies the channel management module to send the debugging prompt message to the third communication channel.
In a possible implementation manner, a plurality of communication channels exist between the server and the second terminal, the server includes a channel management module, an information flow module, and a plurality of second controllers, and the plurality of second controllers respectively correspond to the plurality of communication channels;
the receiving unit is further configured to execute sending the debugging result to the information flow module based on the channel management module receiving the debugging result of the first page from the first terminal;
the sending unit is further configured to execute sending the debugging result to a second controller corresponding to the fourth communication channel in the plurality of communication channels based on the information flow module according to the debugging result, and the second controller notifies the channel management module to send the debugging result to the fourth communication channel.
In a possible implementation manner, the receiving unit is further configured to execute receiving, by a fifth communication channel, a container status obtaining request of the second terminal, where the container status obtaining request is used to indicate to obtain status data of a web view mounted on the first page, and the fifth communication channel corresponds to an attribute panel of the second terminal, where the attribute panel is used to provide a function of a web view status;
The sending unit is further configured to execute sending the container status acquisition request to the first terminal;
the receiving unit is further configured to execute receiving the state data of the webpage view from the first terminal;
the sending unit is further configured to execute sending the status data of the web page view to the second terminal through a fifth communication channel.
In a possible implementation manner, a plurality of communication channels exist between the server and the second terminal, the server includes a channel management module, an information flow module, and a plurality of second controllers, and the plurality of second controllers respectively correspond to the plurality of communication channels;
the receiving unit is further configured to perform sending the status data to the information flow module based on the channel management module receiving the status data from the first terminal;
the sending unit is further configured to execute sending the status data to a second controller corresponding to a fifth communication channel of the plurality of communication channels according to the status data based on the information flow module, and the second controller notifies the channel management module to send the status data to the fifth communication channel.
In a possible implementation manner, the receiving unit is further configured to execute receiving, by a fifth communication channel, a container performance obtaining request of the second terminal, where the container performance obtaining request is used to indicate to obtain performance data of a web page view mounted on the first page, and the fifth communication channel corresponds to an attribute panel of the second terminal, where the attribute panel is used to provide a function of web page view performance;
the sending unit is further configured to execute sending the container performance acquisition request to the first terminal;
the receiving unit is further configured to execute receiving performance data of the webpage view from the first terminal;
the sending unit is further configured to execute sending the performance data of the web page view to the second terminal through the fifth communication channel.
In a possible implementation manner, a plurality of communication channels exist between the server and the second terminal, the server includes a channel management module, an information flow module, and a plurality of second controllers, and the plurality of second controllers respectively correspond to the plurality of communication channels;
the receiving unit is further configured to perform sending the status data to the information flow module based on the channel management module receiving the status data from the first terminal;
The sending unit is further configured to execute sending the status data to a second controller corresponding to a fifth communication channel of the plurality of communication channels according to the status data based on the information flow module, and the second controller notifies the channel management module to send the status data to the fifth communication channel.
In a possible implementation manner, the receiving unit is further configured to execute receiving, by a fifth communication channel, an application performance obtaining request of the second terminal, where the application performance obtaining request is used for instructing to obtain performance data of the target application, and the fifth communication channel corresponds to an attribute panel of the second terminal, where the attribute panel is used for providing a function of the performance of the target application;
the sending unit is further configured to execute sending the application performance obtaining request to the first terminal;
the receiving unit is further configured to execute receiving performance data of the target application from the first terminal;
the sending unit is further configured to execute sending the performance data of the target application to the second terminal through the fifth communication channel;
In a possible implementation manner, a plurality of communication channels exist between the server and the second terminal, the server includes a channel management module, an information flow module, and a plurality of second controllers, and the plurality of second controllers respectively correspond to the plurality of communication channels;
the receiving unit is further configured to perform sending the performance data to the information flow module based on the channel management module receiving the performance data from the first terminal;
the sending unit is further configured to execute sending the performance data to a second controller corresponding to a fifth communication channel of the plurality of communication channels according to the performance data based on the information flow module, and the second controller notifies the channel management module to send the performance data to the fifth communication channel.
According to a sixth aspect of the embodiments of the present disclosure, there is provided a page debugging apparatus applied to a second terminal, the apparatus including:
the debugging device comprises a receiving unit, a debugging prompting unit and a processing unit, wherein the receiving unit is configured to execute a third communication channel and receive a debugging prompting message of a first terminal sent by a server, the debugging prompting message is used for prompting that a first page in a target application of the first terminal supports debugging, the third communication channel corresponds to a main panel of a second terminal, and the main panel is used for providing a function of processing the debugging prompting message;
A sending unit, configured to execute a debugging operation on the first page, and send a debugging request to the server through a fourth communication channel, where the debugging request is used to instruct to debug the first page, the fourth communication channel corresponds to a debugging panel of the second terminal, and the debugging panel is used to provide a function of page debugging;
the receiving unit is further configured to execute receiving, through the fourth communication channel, a debugging result of the first page sent by the server.
In one possible embodiment, the apparatus further comprises:
the first display unit is configured to be executed in the main panel and display debugging options and address information of the first page carried by the debugging prompt message;
the first display unit is further configured to execute a selection operation for responding to the debugging option in the main panel, and display the debugging panel, wherein the debugging panel comprises a debugging function option which is used for providing a function for generating the debugging request;
the sending unit is further configured to execute sending the debugging request to the server through a fourth communication channel in response to the selection operation of the debugging function option.
In a possible implementation manner, the main panel further includes an attribute obtaining option, and the attribute obtaining option corresponds to the address information;
the first display unit is further configured to execute a selection operation responding to the attribute acquisition option, and display an attribute panel of the first page, wherein the attribute panel is used for providing a function of a webpage view state, and comprises a container state acquisition option;
the sending unit is further configured to execute a container state obtaining request sent to the server through a fifth communication channel in response to a selection operation of the container state obtaining option, where the container state obtaining request is used for indicating to obtain state data of the webpage view mounted on the first page;
the receiving unit is further configured to execute receiving, through the fifth communication channel, the status data of the web page view sent by the server.
In one possible embodiment, the apparatus further comprises:
a second display unit configured to perform displaying the status data of the web page view in the property panel.
In one possible implementation, the property panel is further used for providing a function of web page view performance, and the property panel further comprises a container performance acquisition option;
The sending unit is further configured to execute a container performance obtaining request sent to the server through the fifth communication channel in response to a selection operation of the container performance obtaining option, where the container performance obtaining request is used for indicating to obtain performance data of the webpage view mounted on the first page;
the receiving unit is further configured to execute receiving, through the fifth communication channel, the performance data of the web page view sent by the server.
In one possible embodiment, the apparatus further comprises:
a third display unit configured to display the performance data of the web page view in the property panel.
In one possible implementation, the property panel is further used for providing a function of the performance of the target application, and the property panel further comprises an application performance acquisition option;
the sending unit is further configured to execute, in response to a selection operation of the application performance acquisition option, sending an application performance acquisition request to the server through the fifth communication channel, where the application performance acquisition request is used to instruct to acquire performance data of the target application;
The receiving unit is further configured to execute receiving, through the fifth communication channel, the performance data of the target application sent by the server.
In one possible embodiment, the apparatus further comprises:
a fourth display unit configured to execute displaying the performance data of the target application in the property panel.
In a possible implementation manner, the property panel further includes a real time panel, and the real time panel is used for showing a real time corresponding to the property data of the page, and the apparatus further includes:
and the fifth display unit is configured to display the real time corresponding to the attribute data of the first page in a real time panel.
In one possible embodiment, the property panel further comprises an offline package panel, the offline package panel is used for providing offline page code of the first page, the offline package panel comprises a running option, and the running option is used for providing a function of running the offline page code; the device further comprises:
a running unit configured to execute the offline page code of the first page in response to a selection operation of the running option in the offline package panel.
In one possible embodiment, the apparatus further comprises:
a sixth display unit configured to display a debugging result of the first page in the debugging panel.
According to a seventh aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including:
one or more processors;
one or more memories for storing the one or more processor-executable instructions;
wherein the one or more processors are configured to execute the instructions to implement the page debugging method provided in the first aspect or any optional manner of the first aspect, or the page debugging method provided in the second aspect or any optional manner of the second aspect, or the page debugging method provided in the third aspect or any optional manner of the third aspect.
According to an eighth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium, wherein instructions, when executed by a processor of an electronic device, enable execution of a page debugging method as provided in implementing any one of the above aspects or any one of the alternatives of any one of the above aspects.
According to a ninth aspect of embodiments of the present disclosure, there is provided a computer program product, which includes program code stored in a computer-readable storage medium, and a processor of an electronic device reads the program code from the computer-readable storage medium, and executes the program code, so that the electronic device performs the method provided in the first aspect or the various alternative implementations of the first aspect, or performs the method provided in the second aspect or the various alternative implementations of the second aspect, or performs the method provided in the third aspect or the various alternative implementations of the third aspect.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
the method comprises the steps that a first terminal sends a debugging prompt message to a second terminal through a server to prompt a page supporting debugging in a target application in the first terminal to the second terminal, a debugging request of the second terminal to the page is received through the server, the first terminal obtains a debugging result of the page based on the debugging request, and the server returns the debugging result of the page to the second terminal.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a schematic diagram illustrating a page debugging system in accordance with an exemplary embodiment.
FIG. 2 is a block diagram illustrating various devices in a page debugging system in accordance with an exemplary embodiment.
FIG. 3 is a flowchart illustrating a method of page debugging in accordance with an exemplary embodiment.
FIG. 4 is a flowchart illustrating a method of page debugging in accordance with an exemplary embodiment.
FIG. 5 is a flowchart illustrating a method of page debugging in accordance with an exemplary embodiment.
FIG. 6 is a flowchart illustrating interactions in a page debugging process, according to an example embodiment.
FIG. 7 is a flow diagram illustrating interactions in another page debugging process in accordance with an illustrative embodiment.
FIG. 8 is an architecture diagram illustrating a page debugging system in accordance with an exemplary embodiment.
Fig. 9 is a diagram illustrating a correspondence relationship of page debugging according to an exemplary embodiment.
Fig. 10 is a communication architecture diagram illustrating a server in accordance with an example embodiment.
FIG. 11 is a flow diagram illustrating a container status data acquisition in accordance with an exemplary embodiment.
FIG. 12 is a flow diagram illustrating a container performance data acquisition according to an exemplary embodiment.
FIG. 13 is a flow diagram illustrating an application performance data acquisition according to an example embodiment.
FIG. 14 is a communication flow diagram in a page debugging process shown in accordance with an exemplary embodiment.
Fig. 15 is a block diagram illustrating a page debugging apparatus in accordance with an example embodiment.
Fig. 16 is a block diagram illustrating a page debugging apparatus according to an example embodiment.
Fig. 17 is a block diagram illustrating a page debugging apparatus according to an example embodiment.
FIG. 18 is a block diagram illustrating an electronic device in accordance with an example embodiment.
FIG. 19 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The user information to which the present disclosure relates may be information that is authorized by the user or sufficiently authorized by various parties.
Fig. 1 is a schematic diagram illustrating a page debugging system according to an exemplary embodiment, and as shown in fig. 1, a page debugging system 100 includes a plurality of terminals 101 and a server 102. The plurality of terminals 101 and the server 102 are indirectly communicatively connected by a wireless communication method. The plurality of terminals 101 include at least one of a smart phone, a tablet computer, a smart speaker, a smart watch, a notebook computer, a smart phone, a portable game device, or a desktop computer, but the type of the plurality of terminals 101 is not limited thereto.
A first terminal of the plurality of terminals 101 runs an application to be debugged, and a page of the application can be debugged. The first terminal is also a debuggee terminal, and the first terminal may be a mobile phone. The second terminal of the plurality of terminals 101 is used to trigger the first terminal to debug the page in the application program and obtain a debugging result of the page, and the second terminal is a debugging terminal and may be a PC, such as a tablet computer, a notebook computer, or a desktop computer.
The server 102 includes at least one of a server, a plurality of servers, a cloud computing platform, or a virtualization center. In some embodiments, the server 102 is an independent physical server, or a server cluster or distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, web services, cloud communication, middleware services, domain name services, security services, a CDN (Content Delivery Network), and big data and artificial intelligence platforms. The server has a message forwarding function, and message forwarding is performed between the first terminal and the second terminal in the debugging process.
Fig. 2 is a block diagram illustrating respective devices in a page debugging system according to an exemplary embodiment, and as shown in fig. 2, a first terminal 201 and a second terminal 202 each run a debugging application, which is an application program with a page debugging function and is also referred to as a debugging tool. The page debugging function includes debugging a page of the application program, for example, User Interface (UI) debugging, network debugging, page script debugging, and the like of the page.
The first terminal 201 and the second terminal 202 each also run a web browser, and the web browser has a function of displaying an application page. Such as Google (Google) dominates the developed web browser, chrome. In the first terminal 201, the debug front end (front) of the debug application is located in the kernel (core) of the web browser, and in the second terminal 202, the web browser displays the display interface (i.e., the man-machine interaction interface) of the debug front end. The debugging front end is a module in the debugging application and is used for realizing the response and the echo logic of the debugging application. The kernel of the web browser is used for providing a running environment for the debugging front end.
The operating system of the first terminal 201 creates a web page view for each page in the application program, mounts the corresponding web page view on the page, and displays the page on the display interface of the first terminal 201 through the web page view. The webpage view of the page is also referred to as a webpage view of the page, and the operating system is also referred to as Native of the first terminal 201, and includes Android (Android), iOS, or other types of operating systems. A web page view is a control for exposing the content of a page.
The web page views mounted on each page of each application program in the first terminal 201 form a web page view set, and each web page view in the web page view set shares a kernel (core) of a web page browser in the first terminal 201, so the kernel of the web page browser is also referred to as a web page view kernel. And each web view shares the web view kernel, so that the debugging front end in the web view kernel processes the message requesting for debugging the page, and returns the debugging result of the page to the debugging front end in the second terminal 202, and the debugging front end in the web view kernel displays the debugging result of the page.
The operating system of the first terminal 201 includes a message manager (message manager), and the message manager is used as a manager of a message and is mainly responsible for distribution of the message and generation and analysis of a message in a debugging process. As shown in fig. 2, a plurality of first communication channels exist between the web page view and the operating system, and each first communication channel corresponds to one web page view in the web page view set. Optionally, the first communication channel is a local socket (localcocket).
The debugging front end in the second terminal 202 sends a debugging request to the server 203 for a certain page of a certain application program in the first terminal 201, the server 203 forwards the debugging request to the message management module of the first terminal 201, the message management module sends the debugging request to the debugging front end in the webpage view kernel through a first communication channel corresponding to the webpage view of the page, the debugging front end in the webpage view kernel debugs the page based on the debugging request, and returns a debugging result to the debugging front end in the second terminal 202, and the debugging front end in the second terminal 202 displays the debugging result.
To further illustrate the process of debugging a page by a first terminal, reference is made to fig. 3, which is a flowchart illustrating a page debugging method according to an exemplary embodiment, the method being applied to the first terminal, and the method including:
in step 301, in response to a debugging prompt operation on a first page in a target application, a first terminal sends, through a server, a debugging prompt message to a second terminal, where the debugging prompt message is used to prompt that the first page in the target application supports debugging.
In step 302, the first terminal receives a debugging request of the second terminal from the server, where the debugging request is used for instructing to debug the first page.
In step 303, the first terminal obtains a debugging result of the first page based on the debugging request.
In step 304, the first terminal sends the debugging result of the first page to the second terminal through the server.
In the method provided by the embodiment of the disclosure, the first terminal sends the debugging prompt message to the second terminal through the server to prompt the second terminal about a page supporting debugging in the target application in the first terminal, and receives the debugging request of the second terminal to the page through the server, and then the first terminal obtains the debugging result of the page based on the debugging request and returns the debugging result of the page to the second terminal through the server.
In a possible implementation manner, the web view mounted on the first page corresponds to a first communication channel, and the first communication channel is a communication channel between an operating system of the first terminal and a web view kernel;
the obtaining of the debugging result of the first page based on the debugging request comprises:
sending the debugging request to the webpage view kernel through the first communication channel corresponding to the webpage view, and debugging the first page by the webpage view kernel based on the debugging request to obtain a debugging result of the first page;
and receiving a debugging result of the first page sent by the debugging front end through the first communication channel corresponding to the webpage view.
In one possible embodiment, the method further comprises:
responding to debugging prompt operation of a first page in a target application, and acquiring a webpage view for mounting the first page;
and creating the first communication channel corresponding to the webpage view.
In one possible embodiment, the creating the first communication channel corresponding to the web page view includes:
responding to debugging prompt operation of a first page in a target application, and acquiring address information of the first page, wherein the address information comprises an identifier of the webpage view;
Creating a first communication channel between the operating system and the web page view kernel;
and establishing a corresponding relation between the address information and the established first communication channel.
In one possible implementation manner, the obtaining address information of a first page in response to a debugging prompt operation on the first page in a target application includes:
responding to a debugging prompt operation of a first page in a target application, and sending an address acquisition request to a webpage view kernel, wherein the address acquisition request is used for indicating to acquire address information of a page which supports debugging and is mounted in a webpage view in the target application;
receiving address information of at least one second page from the web page view kernel;
and inquiring the address information of the first page from the address information of the at least one second page based on the identification of the webpage view.
In one possible embodiment, the first communication channel is a local socket; the method further comprises the following steps:
updating the communication protocol of the first communication channel from a hypertext transfer protocol to a network socket protocol;
the sending the debugging request to the web view kernel through the first communication channel corresponding to the web view comprises:
And sending the debugging request to the first communication channel through the network socket protocol.
In one possible embodiment, the method further comprises:
receiving a container state acquisition request of the second terminal from the server, wherein the container state acquisition request is used for indicating to acquire state data of the webpage view mounted on the first page;
acquiring state data of the webpage view based on the container state acquisition request;
and sending the state data of the webpage view to the second terminal through the server.
In one possible embodiment, the method further comprises:
receiving a container performance acquisition request of the second terminal from the server, wherein the container performance acquisition request is used for indicating to acquire performance data of the webpage view mounted on the first page;
acquiring performance data of the webpage view based on the container performance acquisition request;
and sending the performance data of the webpage view to the second terminal through the server.
In one possible embodiment, the performance data of the web page view includes an amount of resources occupied by the web page view;
the acquiring performance data of the webpage view based on the container performance acquiring request comprises:
And acquiring the resource amount occupied by the webpage view from a memory analysis tool in a webpage browser kernel of the first terminal based on the container performance acquisition request.
In one possible embodiment, the method further comprises:
receiving an application performance acquisition request of the second terminal from the server, wherein the application performance acquisition request is used for indicating to acquire performance data of the target application;
acquiring performance data of the target application based on the application performance acquisition request;
and sending the performance data of the target application to the server through the server.
In one possible implementation, the performance data of the target application includes an amount of resources occupied by the target application;
the acquiring performance data of the target application based on the application performance acquisition request comprises:
and acquiring the resource amount occupied by the target application from the debugging memory information class in the operating system of the first terminal based on the application performance acquisition request.
In one possible embodiment, the method further comprises:
responding to a debugging prompt operation of a first page in a target application, injecting a target script into a page code of the first page, executing a debugging request of the second terminal received from the server by the target script, acquiring a debugging result of the first page based on the debugging request, and sending the debugging result of the first page to the second terminal through the server.
In a possible implementation manner, the target script includes an information module and a target hijacking module, the target hijacking module includes a target hijacking method, and the target hijacking method is used for providing a page debugging function for an operating system of the first terminal;
the target script receives a debugging request of the second terminal from the server, and the obtaining of the debugging result of the first page based on the debugging request comprises:
the information module receives a debugging request of the second terminal from the server through the second communication channel;
the information module sends the debugging request to the target hijack module;
and the target hijacking module acquires the debugging result of the first page based on the received debugging request and the target hijacking method.
In a possible implementation, the target script includes at least one agent module and at least one specific hijacking module, each agent module corresponds to one specific hijacking module, each specific hijacking module includes a specific hijacking method, and each specific hijacking method is used for providing a page debugging function for an operating system;
The target hijacking module is one of the at least one specific hijacking module, and the target hijacking module corresponds to a target agent module in the at least one agent module;
the step of sending the debugging request to the target hijacking module by the information module comprises the following steps:
the information module sends the debugging request to the target agent module;
and the target agent module receives the debugging request and sends the received debugging request to the target hijack module.
In a possible implementation manner, the target hijacking module is a public hijacking module in the target script, the target hijacking method is a public hijacking method included in the public hijacking module, the public hijacking method is used for providing a page debugging function, and the page debugging function is applicable to various operating systems.
In a possible implementation manner, the webpage view mounted on the first page corresponds to a second communication channel, and the second communication channel is a communication channel between the server and the target script;
the target script receiving the debugging request of the second terminal from the server comprises:
the target script receives a debugging request of the second terminal from the server through the second communication channel;
The sending, by the target script through the server, the debugging result of the first page to the second terminal includes:
and the target script sends the debugging result of the first page to the server through the second communication channel, and the server sends the debugging result of the first page to the second terminal.
All the above optional technical solutions may be combined arbitrarily to form the optional embodiments of the present disclosure, and are not described herein again.
To further illustrate the process of message forwarding in the process of debugging a page by a server, referring to fig. 4, fig. 4 is a flowchart illustrating a page debugging method according to an exemplary embodiment, where the method is applied to a server, and the method includes:
in step 401, the server receives a debugging prompting message from the first terminal, where the debugging prompting message is used to prompt that a first page in a target application of the first terminal supports debugging.
In step 402, the server sends the debug prompt message to the second terminal through a third communication channel, where the third communication channel corresponds to a main panel of the second terminal, and the main panel is configured to provide a function of processing the debug prompt message.
In step 403, the server receives a debugging request of the second terminal through a fourth communication channel, where the debugging request is used to instruct to debug the first page, the fourth communication channel corresponds to a debugging panel of the second terminal, and the debugging panel is used to provide a function of page debugging.
In step 404, the server sends a debug request of the second terminal to the first terminal.
In step 405, the server receives a debugging result of the first page from the first terminal.
In step 406, the server sends the debugging result of the first page to the second terminal through the fourth communication channel.
In the method provided by the embodiment of the disclosure, the server forwards data between the first terminal and the second terminal, so that the second terminal requests the first terminal to debug the page in the application program, and thus, remote debugging can be realized between the first terminal and the second terminal without using a USB connecting line.
In one possible embodiment, the server includes a channel management module, an information flow module, and a first controller, where the first controller corresponds to a communication channel between the server and the first terminal;
Receiving a debugging request of the second terminal through a fourth communication channel; sending the debug request of the second terminal to the first terminal comprises:
the channel management module receives a debugging request of the second terminal through a fourth communication channel and sends the debugging request to the information flow module;
and the information flow module sends the debugging request to the first controller according to the debugging request, and the first controller informs the channel management module to send the debugging request to a communication channel between the server and the first terminal.
In a possible implementation manner, a plurality of communication channels exist between the server and the second terminal, the server includes a channel management module, an information flow module, and a plurality of second controllers, and the plurality of second controllers respectively correspond to the plurality of communication channels;
the receiving of a debugging prompt message from the first terminal; sending the debug prompt message to the second terminal through a third communication channel includes:
the channel management module receives a debugging prompt message from the first terminal and sends the debugging prompt message to the information flow module;
And the information flow module sends the debugging prompt message to a second controller corresponding to the third communication channel in the plurality of communication channels according to the debugging prompt message, and the second controller informs the channel management module to send the debugging prompt message to the third communication channel.
In a possible implementation manner, a plurality of communication channels exist between the server and the second terminal, the server includes a channel management module, an information flow module, and a plurality of second controllers, and the plurality of second controllers respectively correspond to the plurality of communication channels;
the debugging result of the first page is received from the first terminal; sending the debugging result of the first page to the second terminal through the fourth communication channel comprises:
the channel management module receives the debugging result of the first page from the first terminal and sends the debugging result to the information flow module;
and the information flow module sends the debugging result to a second controller corresponding to the fourth communication channel in the plurality of communication channels according to the debugging result, and the second controller informs the channel management module to send the debugging result to the fourth communication channel.
In one possible embodiment, the method further comprises:
receiving a container state acquisition request of the second terminal through a fifth communication channel, wherein the container state acquisition request is used for indicating to acquire state data of the webpage view of the first page, the fifth communication channel corresponds to an attribute panel of the second terminal, and the attribute panel is used for providing a function of the webpage view state;
sending the container state acquisition request to the first terminal;
receiving state data of the webpage view from the first terminal;
and sending the state data of the webpage view to the second terminal through a fifth communication channel.
In a possible implementation manner, a plurality of communication channels exist between the server and the second terminal, the server includes a channel management module, an information flow module, and a plurality of second controllers, and the plurality of second controllers respectively correspond to the plurality of communication channels;
the state data of the webpage view is received from the first terminal; sending the state data of the web page view to the second terminal through a fifth communication channel comprises:
the channel management module receives the state data from the first terminal and sends the state data to the information flow module;
And the information flow module sends the state data to a second controller corresponding to the fifth communication channel in the plurality of communication channels according to the state data, and the second controller informs the channel management module to send the state data to the fifth communication channel.
In one possible embodiment, the method further comprises:
receiving a container performance acquisition request of the second terminal through a fifth communication channel, wherein the container performance acquisition request is used for indicating to acquire performance data of the webpage view of the first page, the fifth communication channel corresponds to an attribute panel of the second terminal, and the attribute panel is used for providing a function of webpage view performance;
sending the container performance acquisition request to the first terminal;
receiving performance data of the webpage view from the first terminal;
and sending the performance data of the webpage view to the second terminal through the fifth communication channel.
In a possible implementation manner, a plurality of communication channels exist between the server and the second terminal, the server includes a channel management module, an information flow module, and a plurality of second controllers, and the plurality of second controllers respectively correspond to the plurality of communication channels;
The performance data of the webpage view is received from the first terminal; sending the performance data of the web page view to the second terminal through a fifth communication channel comprises:
the channel management module receives the performance data from the first terminal and sends the performance data to the information flow module;
and the information flow module sends the performance data to a second controller corresponding to a fifth communication channel in the plurality of communication channels according to the performance data, and the second controller informs the channel management module to send the performance data to the fifth communication channel.
In one possible embodiment, the method further comprises:
receiving an application performance acquisition request of the second terminal through a fifth communication channel, wherein the application performance acquisition request is used for indicating to acquire performance data of the target application, the fifth communication channel corresponds to an attribute panel of the second terminal, and the attribute panel is used for providing a function of the performance of the target application;
sending the application performance acquisition request to the first terminal;
receiving performance data of the target application from the first terminal;
And sending the performance data of the target application to the second terminal through the fifth communication channel.
In a possible implementation manner, a plurality of communication channels exist between the server and the second terminal, the server includes a channel management module, an information flow module, and a plurality of second controllers, and the plurality of second controllers respectively correspond to the plurality of communication channels;
the receiving of performance data of the target application from the first terminal; sending, to the second terminal through the fifth communication channel, the performance data of the target application includes:
the channel management module receives the performance data from the first terminal and sends the performance data to the information flow module;
and the information flow module sends the performance data to a second controller corresponding to a fifth communication channel in the plurality of communication channels according to the performance data, and the second controller informs the channel management module to send the performance data to the fifth communication channel.
All the above optional technical solutions may be combined arbitrarily to form the optional embodiments of the present disclosure, and are not described herein again.
To further illustrate the process of the second terminal requesting the first terminal to debug the page, referring to fig. 5, fig. 5 is a flowchart illustrating a page debugging method according to an exemplary embodiment, the method being applied to the second terminal, the method comprising:
in step 501, a second terminal receives a debugging prompt message of a first terminal sent by a server through a third communication channel, where the debugging prompt message is used to prompt a first page in a target application of the first terminal to support debugging, the third communication channel corresponds to a main panel of the second terminal, and the main panel is used to provide a function of processing the debugging prompt message;
in step 502, the second terminal sends a debugging request to the server through a fourth communication channel in response to the debugging operation on the first page, where the debugging request is used to instruct to debug the first page, the fourth communication channel corresponds to a debugging panel of the second terminal, and the debugging panel is used to provide a page debugging function;
in step 503, the second terminal receives, through the fourth communication channel, the debugging result of the first page sent by the server.
In the method provided by the embodiment of the disclosure, the second terminal receives the debugging prompt message of the second terminal through the server to obtain the page supporting debugging in the target application in the first terminal, and initiates the debugging request for the page to the first terminal through the server, and then receives the debugging result of the page through the server, so that the first terminal and the second terminal can realize remote debugging without using a USB connecting line in the debugging process of the webpage.
In one possible implementation, the sending a debug request to the server through a fourth communication channel in response to the debug operation on the first page includes:
displaying debugging options and address information of the first page carried by the debugging prompt message in the main panel;
responding to the selection operation for the debugging option in the main panel, and displaying the debugging panel, wherein the debugging panel comprises a debugging function option which is used for providing a function for generating the debugging request;
and responding to the selection operation of the debugging function option, and sending the debugging request to the server through a fourth communication channel.
In a possible implementation manner, the property panel is used to provide a function of a web page view state, the main panel further includes a property acquisition option, and the property acquisition option corresponds to the address information, and the method further includes:
responding to the selection operation of the attribute acquisition option, and displaying an attribute panel of the first page, wherein the attribute panel comprises a container state acquisition option;
responding to the selection operation of the container state acquisition option, and sending a container state acquisition request to the server through a fifth communication channel, wherein the container state acquisition request is used for indicating to acquire state data of the webpage view of the first page;
and receiving the state data of the webpage view sent by the server through the fifth communication channel.
In one possible embodiment, after receiving the status data of the web page view sent by the server through the fifth communication channel, the method further includes:
displaying, in the property panel, status data of the web page view.
In a possible implementation manner, the property panel is also used for providing the function of the webpage view performance, and the property panel further comprises a container performance acquisition option; the method further comprises the following steps:
Responding to the selection operation of the container performance acquisition option, and sending a container performance acquisition request to the server through the fifth communication channel, wherein the container performance acquisition request is used for indicating to acquire performance data of the webpage view of the first page;
and receiving the performance data of the webpage view sent by the server through the fifth communication channel.
In one possible embodiment, after receiving, through the fifth communication channel, the performance data of the web page view sent by the server, the method further includes:
in the property panel, performance data of the web page view is displayed.
In a possible implementation manner, the property panel is further used for providing the function of the performance of the target application, and the property panel further comprises an application performance acquisition option; the method further comprises the following steps:
responding to the selection operation of the application performance acquisition option, and sending an application performance acquisition request to the server through the fifth communication channel, wherein the application performance acquisition request is used for indicating to acquire the performance data of the target application;
and receiving the performance data of the target application sent by the server through the fifth communication channel.
In one possible implementation, after receiving, through the fifth communication channel, the performance data of the target application sent by the server, the method further includes:
in the property panel, performance data of the target application is displayed.
In one possible embodiment, the property panel further includes a real time panel, and the real time panel is used for showing a real time corresponding to the property data of the page, and the method further includes:
and displaying the real time corresponding to the attribute data of the first page in a real time panel.
In one possible embodiment, the property panel further comprises an offline package panel, the offline package panel is used for providing offline page code of the first page, the offline package panel comprises a running option, and the running option is used for providing a function of running the offline page code; the method further comprises the following steps:
and in response to the selection operation of the operation option in the offline package panel, executing the offline page code of the first page.
In a possible implementation manner, after the receiving, through the fourth communication channel, the debugging result of the first page sent by the server, the method further includes:
And displaying the debugging result of the first page in the debugging panel.
All the above optional technical solutions may be combined arbitrarily to form the optional embodiments of the present disclosure, and are not described herein again.
To further illustrate the interaction process among the first terminal, the server and the second terminal in the process of debugging the page, referring to fig. 6, fig. 6 is an interaction flow diagram in the process of debugging the page according to an exemplary embodiment.
In step 601, the first terminal sends a debug start request to the server, where the debug start request is used to indicate that the debug authority of the second terminal is started.
The debugging permission refers to the permission for debugging the page in the application program in the first terminal. The debugging start request carries an equipment identifier of a first terminal and an equipment identifier of a second terminal, wherein the debugging end is the second terminal, and the debugged end is the first terminal. The device identification of the first terminal is used for uniquely indicating the first terminal, and the device identification of the second terminal is used for uniquely indicating the second terminal.
The first terminal scans the two-dimensional code of the second terminal, acquires the equipment identifier of the second terminal from the two-dimensional code, generates the debugging starting request based on the equipment identifier of the second terminal and the equipment identifier of the first terminal, and then sends the generated debugging starting request to the server.
In step 602, the server receives the debug start request, and starts a debug right for the second terminal based on the debug start request.
And after receiving the debugging starting request, the server acquires the equipment identifier of the first terminal and the equipment identifier of the second terminal from the debugging starting request. And the first terminal is used as a debugged terminal, the second terminal equipment is used as a debugging terminal, and the debugging corresponding relation between the equipment identifier of the first terminal and the equipment identifier of the second terminal is established, so that the debugging permission of the second terminal is opened.
It should be noted that, in the process of debugging the page of the application program in the first terminal, the step 601 and the step 602 are executed once without being repeated.
In step 603, the first terminal sends a debugging prompt message to the server in response to a debugging prompt operation on a first page in the target application, where the debugging prompt message is used to prompt that the first page in the target application supports debugging.
The target application is any application program which is specified to be debugged by a user in the first terminal. The first page is any page in the target application that supports debugging. The first page includes a fifth generation hypertext Markup Language (H5) page or a hypertext Markup Language page after 5 generations.
The debug prompting message carries address information of the first page, and optionally, the address information of the first page is a Uniform Resource Locator (URL) of the first page.
The debugging prompt operation is used for triggering the first terminal to send the debugging prompt message to the server. The debug operation is, for example, clicking on the first page or performing a slide operation on the first page. Here, the embodiment of the present disclosure does not limit the debugging prompt operation.
In one possible implementation, the step 603 includes the following steps 6301-6304.
In step 6031, the first terminal obtains a webpage view for mounting a first page in the target application in response to a debugging prompt operation for the first page.
For convenience of description, the web page view for mounting the first page is referred to as a web page view of the first page.
The debug prompt operation is also used to trigger opening of the first page. The user carries out debugging prompt operation on the first page in the target application, the first terminal responds to the debugging prompt operation on the first page in the target application, the webpage view of the first page is obtained, and then the first terminal can open the first page through the webpage view.
The first terminal acquires the webpage view of the first page and comprises any one of the following modes 1 or 2.
In the mode 1, the first terminal creates a webpage view for a plurality of pages in the target application program in advance, and mounts each webpage in the corresponding webpage view. The first terminal responds to the debugging prompt operation of a first page in the multiple pages and acquires the webpage view which is created for the first page.
The multiple pages are pages supporting debugging in the target application, and the first page is any one of the multiple pages. The plurality of pages are all H5 pages or hypertext markup language pages after generation 5.
In the mode 2, the first terminal does not create a webpage view for the multiple pages in the target application in advance. The first terminal responds to the debugging prompt operation of a first page in the multiple pages, a webpage view is created for the first page, and in the address information of the first page, the identification of the webpage view is added to indicate that the first page is mounted in the webpage view.
In step 6032, the first terminal obtains address information of a first page in the target application in response to a debug prompt operation for the first page.
In one possible implementation, this step 6032 is performed by the operating system of the first terminal. The operating system responds to debugging prompt operation of a first page in a target application and sends an address acquisition request to a webpage view kernel, wherein the address acquisition request is used for indicating to acquire address information of the page which supports debugging and is mounted in the webpage view in the target application. After receiving the address acquisition request, the web view kernel queries a page which supports debugging and is mounted in the web view in the target application, and sends address information of the queried page to the operating system. And the address information of each second page carries the identification of the webpage view of the second page. The at least one second page comprises the first page since the first page supports debugging that has also been mounted within the web page view.
In one possible implementation, the debug application returns the address information of the queried page to the operating system in the form of a list, for example, the debug application sends the debug list of the target application to the operating system, where the debug list includes the address information of at least one second page of the target application.
Each page of the at least one second page except the first page is already opened by the corresponding webpage view, so each page of the at least one second page except the first page has one webpage view respectively. Before the debugging application returns the debuggable list to the operation, the webpage view of the first page is already created, so that each second page indicated by the debuggable list has one webpage view, and the creation process of the webpage view of each second page can refer to the creation process of the webpage view of the first page, which is not described herein again.
In a possible implementation manner, the operating system sends an address obtaining request to a debugging front end of a debugging application in response to a debugging prompt operation on a first page in a target application, and the debugging front end obtains address information of at least one second page of the target application and returns the address information of the at least one second page to the operating system.
And if the address information of the first page carries the identifier of the web view of the first page, after the address information of at least one second page of the target application is acquired, the operating system queries the address information of the first page from the address information of at least one second page based on the identifier of the web view of the first page.
In step 6033, the first terminal creates a first communication channel corresponding to the web page view based on the address information of the first page.
The first communication channel is a communication channel between an operating system of the first terminal and a webpage view kernel. The first communication channel is used for transmitting messages related to the webpage view in the debugging process.
In one possible implementation, this step 6033 is performed by the operating system of the first terminal. And after the operating system acquires the address information of the first page from the adjustable list, creating a first communication channel between the operating system and the webpage view kernel, establishing a corresponding relation between the address information of the first page and the created first communication channel, and correspondingly, enabling the webpage view to correspond to the created first communication channel through the address information of the first page so as to indicate that the created first communication channel is the communication channel created for the webpage view.
The operating system obtains a Target (Target) identifier and an identifier of the web page view from the address information of the first page, wherein the Target identifier is used for indicating the first page. The operating system establishes a corresponding relation between the identification of the webpage view and the target identification, and establishes a corresponding relation between the identification of the webpage view and the first communication channel, so that the first communication channel corresponds to the webpage view. And the corresponding relation among the target identification, the identification of the webpage view and the first communication channel is also the corresponding relation between the address information of the first page and the created first communication channel.
When the first communication channel is a local socket, a transmission Protocol of the first communication channel is a Hypertext Transfer Protocol (HTTP). The first terminal also updates the communication protocol of the first communication channel from the HTTP protocol to a web socket (WebSocket) protocol so as to realize the upgrading of the communication protocol.
It should be noted that the process shown in steps 6032-6033 is also a process of creating the first communication channel corresponding to the web page view. The process is an optional process, and after the web page view is created for each second page in the target application, the first terminal may create a first communication channel for the web page view of each second page, respectively, so as to implement message isolation. Of course, the first terminal may not create a first communication channel for the web page view of each second page in the target application, and create a first communication channel, where the at least one second page shares the first communication channel.
In step 6034, the first terminal generates the debug prompt message based on the address information of the first page, and sends the debug prompt message to the server.
For example, the adjustable list includes address information of the first page, the first terminal generates a debugging prompting message carrying the adjustable list based on the adjustable list, and then sends the debugging prompting message to the server, where the debugging prompting message carries the adjustable list.
In a possible implementation manner, a sixth communication channel exists between the operating system of the first terminal and the server, and the first terminal sends a debugging prompt message to the sixth communication channel, so that the debugging prompt message is transmitted to the server.
If the message format of the message transmitted in the sixth communication channel is the target message format first terminal, before sending the debugging prompt message, the first terminal firstly adopts the target message format to package the debugging prompt message, and then sends the packaged debugging prompt message to the sixth communication channel.
Wherein the sixth communication channel is a socket. The target message format includes a data format of a pseudo Cisco Discovery Protocol (CDP) or other type of data format.
In step 604, the server receives a debug alert message from the first terminal.
In step 605, the server sends the debug prompt message to the second terminal through a third communication channel, where the third communication channel corresponds to a main panel of the second terminal, and the main panel is used to provide a function of processing the debug prompt message.
The third communication channel is a communication channel between the server and the second terminal, and corresponds to a main panel of the debugging application in the second terminal. Optionally, the third communication channel is a Socket (Socket). The main panel is a man-machine interface of the debugging application, for example, used for displaying the address information carried by the debugging prompt message.
After the server receives the debugging prompt message from the first terminal, the second device is determined to be a debugging end based on the stored corresponding relation between the device identifier of the first terminal and the device identifier of the second terminal, and the third communication channel is established between the server and the second terminal. And after the establishment is finished, the server sends the debugging prompt message to the third communication channel so as to prompt the second terminal about the page which can be debugged in the target application in the first terminal.
In step 606, the second terminal receives the debugging prompt message of the first terminal sent by the server through the third communication channel.
For example, the second terminal receives the debug alert message from the third communication channel.
In step 607, the second terminal sends a debug request to the server through a fourth communication channel in response to the debug operation on the first page, where the debug request is used to instruct to debug the first page, the fourth communication channel corresponds to a debug panel of the second terminal, and the debug panel is used to provide a function of page debugging.
The fourth communication channel is a communication channel between the server and the second terminal, and corresponds to a debugging panel for debugging applications in the second terminal. The debugging panel is used for providing a function of triggering the second terminal to request the first terminal to debug the page and a function of displaying a debugging result.
In one possible implementation, the step 607 includes the following steps 6071-6073.
In step 6071, the second terminal displays, in the main panel, the debugging option and the address information of the first page carried by the debugging prompt message.
Wherein the debug option is for triggering a debug panel that displays a debug application. And the second terminal displays the main panel and displays the debuggable list carried by the debugging prompt message on the main panel when the debugging prompt message is received from the third communication channel because the third communication channel corresponds to the main panel.
And if the debuggable list carried by the debugging prompt message comprises the address information of the first page, the second terminal displays the main panel, and displays a debugging option and the address information of the first page in the main panel, wherein the debugging option corresponds to the address information of the first page.
And if the debuggable list carried by the debugging prompt message comprises the address information of at least one second page, the second terminal displays the main panel, a plurality of debugging options and the debuggable list are displayed in the main panel, and each debugging option corresponds to the address information of one second page in the debuggable list respectively.
In step 6072, the second terminal displays a debug panel including a debug function option for providing a function of generating a debug request in response to a selection operation for the debug option in the main panel.
The debugging application is used for providing at least one debugging function for the page, the debugging panel comprises at least one debugging function option, each debugging function option corresponds to one debugging function, and each debugging function option is used for providing and generating a debugging request for realizing the corresponding debugging function. For example, the multiple debugging functions provided by the debugging application are respectively a UI debugging function, a network debugging function, and a page script debugging function, and taking the UI debugging function as an example, the debugging function option corresponding to the UI debugging function triggers the generated debugging request to instruct to perform UI debugging on the page.
And when the debuggable list displayed in the main panel comprises the address information of at least one second page, selecting any page from the at least one second page by the user for debugging. For example, the page selected for debugging by the user in the main panel may be a first page that triggers the debugging prompt message, or may also be a second page other than the first page in the debuggable list, and for convenience of description, the following description is given in the embodiment of the present disclosure by taking the user selecting the first page in the main panel for debugging as an example:
And the second terminal responds to the selection operation of the debugging options in the main panel and displays the debugging panel of the first page.
In step 6073, the second terminal sends the debug request to the server through a fourth communication channel in response to the selection operation of the debug function option.
The selection operation of the debugging option in the main panel and the selection operation of the debugging function option are also the debugging operation of the first page.
And the second terminal responds to the selection operation of the debugging function option to generate a debugging request corresponding to the debugging function. And then, the second terminal establishes a fourth communication channel corresponding to the debugging panel, wherein the fourth communication channel is a communication channel between the second terminal and the server and corresponding to the debugging panel of the first page.
The second terminal also establishes a corresponding relation between the fourth communication channel and the webpage view of the first page to indicate that the fourth communication channel is a communication channel between the debugging panel of the first page and the server. For example, the second terminal adds the identifier of the web page view of the first page on the fourth communication channel to indicate that the fourth communication channel corresponds to the web page view.
And after the fourth communication channel is established, the second terminal sends the debugging request to the fourth communication channel, so that the debugging request is transmitted to the server.
If the message format of the message transmitted in the fourth communication channel is the target message format second terminal, before sending the state data of the webpage view, the second terminal firstly adopts the target message format to package the debugging request, and then sends the packaged debugging request to the fourth communication channel.
In step 608, the server receives the debug request of the second terminal through a fourth communication channel.
For example, the server receives the debugging request from the fourth communication channel, and since the fourth communication channel carries the identifier of the web page view of the first web page, the server can also add the identifier of the web page view of the first web page to the debugging request. And then sending a debugging request carrying the identification of the webpage view to the first terminal.
In step 609, the server sends a debug request of the second terminal to the first terminal.
After receiving the debugging request, the server determines that the first terminal is the debugged terminal based on the corresponding relationship between the device identifier of the second terminal and the device identifier of the first terminal, and then sends the debugging request to a fifth communication channel between the server and the first terminal so as to send the debugging request to the first terminal.
In step 610, the first terminal receives a debug request of the second terminal from the server.
For example, the first terminal receives the debugger request from a fifth communication channel with the server.
In step 611, the first terminal obtains a debugging result of the first page based on the debugging request.
In one possible implementation, this step 611 is implemented by an operating system of the first terminal and a web view kernel in the first terminal. For example, steps 6111 and 6114 described below.
In step 6111, the operating system sends a debugging request to the web view kernel through the first communication channel corresponding to the web view of the first page.
After receiving the debugging request, the operating system acquires the identifier of the webpage view of the first page from the debugging request, determines the target identifier of the first page corresponding to the identifier of the webpage view of the first page based on the corresponding relationship between the webpage view and the target identifier, and determines the first communication channel corresponding to the target identifier of the first page based on the corresponding relationship between the target identifier and the first communication channel. And then, the operating system sends the debugging request to the determined first communication channel so as to send the debugging request to the webpage view kernel.
In a possible implementation manner, if the communication protocol of the first communication channel is the WebSocket protocol, the operating system sends the debugging request to the first communication channel through the WebSocket protocol. For example, before sending the debug request, the operating system converts the message format of the debug request from the target message format into the message format of the WebSocket protocol, and sends the converted debug request to the determined first communication channel.
In step 6112, the web page view kernel receives the debugging request from the first communication channel, and debugs the first page based on the debugging request, so as to obtain a debugging result of the first page.
For example, after receiving the debugging request, the web page view kernel sends the debugging request to a debugging front end, and the debugging front end accesses the web page view of the first page based on the debugging request, and debugs the first page in the web page view to obtain a debugging result of the first page.
In step 6113, the web view kernel sends the debugging result of the first page to the operating system through the first communication channel corresponding to the web view of the first page.
For example, the debugging front end in the webpage view kernel sends the debugging result of the first page to the first communication channel, so that the debugging result of the first page is transmitted to the operating system.
In step 6114, the operating system receives the debugging result of the first page from the first communication channel.
In step 612, the first terminal sends the debugging result of the first page to the server.
Optionally, the first terminal sends the debugging result of the first page to a sixth communication channel, so that the debugging result of the first page is transmitted to the server.
If the message format of the message transmitted in the sixth communication channel is the target message format, before sending the debugging result of the first page, the first terminal firstly adopts the target message format to package the message format of the debugging result of the first page, and then sends the packaged debugging result of the first page to the sixth communication channel.
In step 613, the server receives the debugging result of the first page from the first terminal.
For example, the server receives the debugging result of the first page from the sixth communication channel of the first terminal.
In step 614, the server sends the debugging result of the first page to the second terminal through the fourth communication channel.
For example, the server sends the debugging result of the first page to the fourth communication channel, so that the debugging result of the first page is transmitted to the second terminal.
In step 615, the second terminal receives the debugging result of the first page sent by the server through the fourth communication channel.
For example, the second terminal receives the debugging result of the first page from the fourth communication channel, and displays the debugging result of the first page in the debugging panel corresponding to the fourth transmission channel for the user to view.
In the method provided by the embodiment of the disclosure, the first terminal sends the debugging prompt message to the second terminal through the server to prompt the second terminal about a page supporting debugging in the target application in the first terminal, and receives the debugging request of the second terminal to the page through the server, and then the first terminal obtains the debugging result of the page based on the debugging request and returns the debugging result of the page to the second terminal through the server. And the webpage view of each page corresponds to one first communication channel respectively, and the operating system of the first terminal transmits the debugging request and the debugging result of the corresponding webpage in the first communication channel of each page and the webpage view, so that data isolation is realized. The main panel and the debugging panel at the front end of the debugging respectively correspond to different communication channels, and different types of data are transmitted through the different communication channels, so that data isolation is realized.
In another possible implementation manner, the first terminal can also inject a target script into the page code of the page to assist in debugging the application, so as to complete debugging of the page. Referring to FIG. 7, another interaction flow diagram during page debugging is shown in accordance with an illustrative embodiment.
In step 701, in response to a debugging prompt operation on a first page in a target application, a first terminal injects a target script into a page code of the first page.
The target script is also called a backend script, such as backend.js. The target script is used for providing a debugging function for the page, and hijacks a global method of a first page in a Hook mode to acquire the operation of a user on the page, generate a message corresponding to the user operation, feed the message back to a debugging front end of a debugging tool, and make corresponding UI presentation by the debugging front end. For example, a user performs an operation of obtaining a log on a page, after obtaining the operation, the target script hijacks the log of the first page, returns the hijacked log information to the debugging front end, and displays the hijacked log information by the debugging front end. It should be noted that the debugging function of the target script delivery page may be customized according to the requirement of the user, so that the target script is customized based on different operations of the user on the page.
The target script can be compatible with different types of operating systems, and the debugging function of the debugging tool can be expanded. In one possible implementation, the target script includes at least one of a Common hijack module (Common Hook) and at least one specific hijack module, wherein the Common hijack module includes a Common hijack method, the Common hijack method is used for providing a function of page debugging, and the function of page hijack debugging is applicable to various operating systems. Each specific hijacking module comprises a specific hijacking method. Each specific hijacking method is used to provide page debugging functionality for an operating system.
The public hijacking method or the specific hijacking method comprises at least one hijacking method, different hijacking methods are used for hijacking different methods of the first page, and each hijacking method can be customized according to the requirements of users.
For example, fig. 8 is an architecture diagram of a page debugging system according to an exemplary embodiment, and as shown in fig. 8, a target script (BackEnd) includes at least one of an iOS hijacking module (iOS Hook), an Android hijacking module (Android Hook), and a public hijacking module. The iOS hijacking module and the android hijacking module are specific hijacking modules, and a specific hijacking method included in the iOS hijacking module is used for providing a page debugging function for the iOS operating system. The Android hijack module comprises a specific hijack method for providing a page debugging function for the Android operating system. The common hijack methods included in the public hijack module are both suitable for an iOS operating system and an android operating system.
In a possible implementation manner, in this step 701 is executed by an operating system in the first terminal, the operating system mounts the first page in a page view in response to a debugging prompt operation on the first page in the target application, injects the target script into a page code of the first page, and after the page code runs, the target script runs along with the first page code, and the target script performs global hijacking on the page code of the first page.
In one possible implementation, the step 701 includes the following steps 7011-7012.
In step 7011, the first terminal obtains a web page view for mounting a first page in the target application in response to a debugging prompt operation on the first page.
Step 7011 is the same as step 6031, and this step 7011 is not described again in this disclosure.
In step 7012, the first terminal injects the target script into the page code of the first page in the web page view in response to a debugging prompt operation on the first page in the target application.
In one possible implementation, this step 7011 and 7012 is performed by an operating system in the first terminal.
In step 702, the first terminal sends a debugging prompt message to the server in response to a debugging prompt operation on a first page in the target application, where the debugging prompt message is used to prompt that the first page in the target application supports debugging.
In one possible implementation, this step 702 is performed by a target script. For example, after the target script is injected into the page code of the first page, the target script sends an address obtaining request to the page view kernel to obtain the debuggable list of the target application from the page view. And the target script generates a debugging prompt message based on the debuggable list and sends the generated debugging prompt message to the server.
In one possible implementation, the target script obtains address information of the first page from the debuggable list according to the identification of the webpage view of the first page. The target script creates a second communication channel between the target script and the server, and establishes a corresponding relationship between the webpage view and the second communication channel to indicate that the second communication channel is a communication channel of the webpage view between the target script and the server. The process of establishing the corresponding relationship between the web page view and the second communication channel is the same as the process of establishing the corresponding relationship between the first communication channel and the web page view in step 6033, and details of the embodiment of the present disclosure are not repeated herein.
And after the second communication channel corresponding to the webpage view is established, the target script sends the packaged debugging prompting message to the second communication channel, so that the debugging prompting message is transmitted to the server. If the message format of the message transmitted in the second communication channel is the target message format, before the debugging prompt message is sent, the target script firstly adopts the target message format to package the debugging prompt message, and then the packaged debugging prompt message is sent to the second communication channel.
It should be noted that, for each second page indicated by the debuggable list, the target code may or may not be injected into the page code of each second page. And for each second page injected with the target code, establishing a second communication channel between the target code and the server to realize message isolation.
In step 703, the server receives a debug prompt message from the first terminal, and sends the debug prompt message to the second terminal through a third communication channel, where the third communication channel corresponds to a main panel of the second terminal, and the main panel is used to display the debug prompt message.
For example, the server receives the debugging prompting message from the second communication channel corresponding to the web page view of the first page, and after receiving the debugging prompting message, the server sends the debugging prompting message to the third communication channel, so that the debugging prompting message is transmitted to the second terminal.
In step 704, the second terminal receives a debugging prompt message of the first terminal sent by the server through the third communication channel.
In step 705, the second terminal sends a debug request to the server through a fourth communication channel in response to the debug operation on the first page, where the debug request is used to instruct to debug the first page, the fourth communication channel corresponds to a debug panel of the second terminal, and the debug panel is used to trigger page debugging and display a debug result of the page.
Step 705 is the same as step 607, and here, this step 705 is not described again in this disclosure.
In step 706, the server receives a debug request of the second terminal through a fourth communication channel.
In step 707, the server sends a debug request of the second terminal to the first terminal.
For example, the server sends a debugging request to a second communication channel corresponding to the webpage view of the first page, so that the debugging request is transmitted to the first terminal.
In step 708, the first terminal receives a debugging request of the second terminal from the server, and obtains a debugging result of the first page based on the debugging request and the target script.
In this step 708, the target script in the page code of the first page is executed, the target script receives the debugging request from the second communication channel corresponding to the web page view of the first page, and the target script obtains the debugging result of the first page based on the debugging request and the target script. Such as the process shown in steps 7081-7083 described below.
In step 7081, the information module in the target script receives a debugging request of the second terminal from the server through the second communication channel.
The information module (Messenger) is a module in the target script for transmitting data and interacting with the server, as shown in fig. 8.
In step 7082, the information module sends the debug request to the target hijacking module.
The target hijacking module is a hijacking module which is used for providing a page hijacking method for an operating system of the first terminal in the target script. The target hijacking module is any one of at least one specific hijacking module in the target script. For example, if the operating system of the first terminal is an android operating system, the target hijacking module is an android hijacking module, and if the operating system of the first terminal is an iOS operating system, the target hijacking module is an android hijacking module, or if the operating system of the first terminal is the android operating system or the iOS operating system, the target hijacking module is a public hijacking module.
In the present example of the target script shown in fig. 8, the target script further includes at least one Agent module (Agent), and each Agent module is respectively corresponding to one hijack module in the target script and is configured to receive and transmit a message corresponding to the hijack module.
Correspondingly, the information module sends a debugging request to a target agent module in the at least one agent module, the target agent module receives the debugging request and sends the received debugging request to the target hijack template so as to realize that the information module sends the debugging request to the target hijack module. The target agent module is an agent module corresponding to the target hijack module in the at least one agent module.
In step 7083, the target hijack module receives the debug request, and obtains a debug result of the first page based on the received debug request and the target hijack method.
The target hijacking method is a hijacking method provided by the target hijacking module.
The target hijacking module receives the debug request from the target agent module. And after receiving the debugging request, the target hijacking module hijacks parameters of the page code of the first page in the running process by adopting a target hijacking method, and takes a hijacking result as a debugging result of the first page.
In the example of the target foot shown in fig. 8, a receiving submodule (Listener) in the information module receives the debugging request from the second communication channel between the receiving submodule and the server, and if the hijacking method corresponding to the debugging request is located in the iOS hijacking module, the receiving submodule sends the debugging request to the iOS proxy module, and the iOS proxy module sends the debugging request to the iOS hijacking module, and the iOS hijacking module hijacks the parameters of the page code of the first page in the running process by using the hijacking method in the iOS based on the debugging request, and uses the hijacking result as the debugging result of the first page. If the hijacking method corresponding to the debugging request is located in the android hijacking module or the public hijacking module, the receiving sub-module sends the debugging request to the corresponding proxy module, the corresponding proxy module sends the debugging request to the corresponding hijacking module, and the hijacking module acquires the debugging result of the first page based on the hijacking request.
In step 709, the first terminal sends the debugging result of the first page to the second terminal through the server.
And the first terminal sends the debugging result of the first page to a second communication channel corresponding to the webpage view of the first page, so that the debugging result of the first page is transmitted to the second terminal.
In one possible implementation, this step 710 is performed by a target script within the page code of the first page. Still taking fig. 8 as an example, if the iOS hijack module obtains the debugging result of the first page, the iOS hijack module sends the debugging result to the iOS proxy module, the iOS proxy module sends the debugging result of the first page to a sending submodule (Sender) in the information module, and the sending submodule sends the debugging result of the first page to the second communication channel, so that the debugging result of the first page is transmitted to the server. And after receiving the debugging result of the first page, the server sends the debugging result of the first page to the second terminal through the fourth communication channel.
In step 710, the second terminal receives the debugging result of the first page sent by the server.
For example, the second terminal receives the debugging result of the first page in the fourth communication channel, and displays the debugging result of the first page in the debugging panel corresponding to the fourth communication channel for the user to view.
In the method provided by the embodiment of the disclosure, the first terminal sends the debugging prompt message to the second terminal through the server to prompt the second terminal about a page supporting debugging in the target application in the first terminal, and receives the debugging request of the second terminal to the page through the server, and then the first terminal obtains the debugging result of the page based on the debugging request and returns the debugging result of the page to the second terminal through the server. And the first terminal debugs the first page by injecting a target script into the page code of the first page, wherein the target script can be suitable for different operating systems, can expand the debugging function of a debugging tool and assists the debugging tool to debug the page, so that customized debugging of the page can be realized.
In one possible embodiment, the debugging application also has an attribute acquisition function. The attribute acquiring function is a function of acquiring attribute data of a page. The attribute data of the page includes container state data, container performance data of the page, and performance data of an application to which the page belongs. The container state data comprises state data of a webpage view of the debugged page, and the container performance data comprises performance data of the webpage view of the debugged page.
Accordingly, the debugging application comprises a debugger (observer) and an attribute retriever, wherein the debugger has a page debugging function, and the attribute retriever has an attribute retrieving function. In a main interface of a debugging front end, a debugger corresponds to a debugging panel, an attribute acquirer corresponds to an attribute panel, and the attribute panel is used for providing a function of triggering a second terminal to acquire attribute data of a page from a first terminal and a function of displaying the attribute data of the page.
Still taking fig. 8 as an example, as shown in fig. 8, the front-end module includes a debug panel, an attribute panel, and a main panel, where the debug panel, the attribute panel, and the main panel all include information modules, and the information module in each panel is used to transmit messages between the corresponding panel and the server.
The debugging panel is used for triggering page debugging and displaying debugging results of the pages. The debugging panel also comprises a plurality of debugging function panels, and each debugging function panel is used for triggering the first terminal to debug the page with a debugging function and displaying a corresponding debugging result. For example, the debugging function Panel includes an Element Panel (Element Panel), a Network Panel (Network Panel), and other debugging function panels, where a debugging request generated by the Element Panel is used to trigger the first terminal to debug the page layout of the page, and the Element Panel can also display a debugging result of the first terminal on the page layout. The debugging request generated by the network panel is used for triggering the first terminal to debug the network occupied by the page, and the network panel can also display the debugging result of the first terminal to the network. Other debugging function panels can be customized according to the requirements of users.
The attribute panel is used for triggering the acquisition of the page attribute data and the display of the page attribute data. The property panel also includes a plurality of property function panels, and the information module is configured to receive messages from each of the property function panels and to send messages to each of the debug panels. Each attribute function panel is used for triggering the acquisition of attribute data of a page from the first terminal and displaying the acquired attribute data. For example, the attribute function Panel includes a Real Time Panel (Real Time Panel) for displaying Real Time corresponding to the attribute data, an Offline Package Panel (Offline Package Panel) for providing Offline page codes of the page, and other attribute panels, so that the second terminal can directly run the Offline page codes to display the page. Other property function panels can be customized according to user requirements.
The main panel is used for displaying the debugging prompt message of the first terminal. The main panel comprises a connection Module (Connect Module) and other modules, and the information Module is used for showing a debuggable list of the application program and triggering and displaying a debugging panel and an attribute panel. Other modules can be customized according to user requirements.
Accordingly, the operating system of the first terminal provides the capability to collect container state data, container performance data, or application performance data in addition to creating a communication channel to the front-end module for each web page view.
Based on different panels in the main interface of the debugging front end, a user can select to debug the page in the application program in the first terminal or obtain the attribute data of the page. Referring to fig. 9 showing a correspondence diagram of page debugging according to an exemplary embodiment, as shown in fig. 9, 3 pages in an application program of a first terminal support debugging, and the 3 pages are respectively mounted in the web page views A, B and C. And triggering the second terminal to request the first terminal to debug the page in the webpage view A through the debugging panel corresponding to the page in the webpage view A by the user, and triggering the second terminal to acquire the attribute data of the page in the webpage view A from the first terminal through the attribute panel corresponding to the page in the webpage view A. And triggering the second terminal to acquire the attribute data of the page in the webpage view B from the first terminal through the attribute panel corresponding to the page in the webpage view B by the user, and not selecting to debug the page in the webpage view B. And the user triggers the second terminal to request the first terminal to debug the page in the webpage view C through the debugging panel corresponding to the page in the webpage view C, and does not select to acquire the attribute data of the page mounted in the webpage view C.
In a possible implementation, between the second terminal and the server, a communication channel is created for each of the main panel, the debugging panel and the attribute panel of different pages, so as to transmit data related to the corresponding panel through different communication channels. And a communication channel is established between the server and the first terminal so as to transmit information related to the page debugged in the first terminal. Correspondingly, for any page in the target application in the first terminal, the page corresponds to a data transmission channel from the first terminal to the second terminal, and the message format of the data transmission channel may be a target message format, for example, a message format of a WebSocket protocol, where the data transmission channel is also referred to as a WebSocket channel. Each endpoint in the data transmission channel comprises an operating system of the first terminal, the debugging panel in the debugging front end, the attribute panel and the main panel. Each endpoint in the data transmission channel is also referred to as a Client (Client), or WebSocket Client. The data transmission channels corresponding to different pages (or web page views) are different, and the server stores the endpoint information of each data transmission channel in order to distinguish the data transmission channels corresponding to different pages.
For example, fig. 10 is a communication architecture diagram of a server according to an exemplary embodiment, in a process of debugging a page, the server stores endpoint information of a data transmission channel of the page as the data transmission channel is established. The endpoint information of the data transmission channel includes an operating system type, a debug panel type, an attribute panel type, and a main panel type. For any page (or a webpage view corresponding to the page) in the target application in the first terminal, the operating system type of the page is indicated by the identifier of the operating system in the first terminal, the debugging panel type of the page is indicated by the identifier of the debugging panel, the attribute panel type of the page is indicated by the identifier of the attribute panel, and the main panel type of the page is indicated by the identifier of the main panel. The operating systems of different first terminals have different identifications, the debugging panels of different pages have different identifications, the attribute panels have different identifications, and the main board panels have different identifications. As shown in fig. 10, the endpoint information of the data transmission channel corresponding to a certain page recorded in the server includes an operating system a, a debug panel a, an attribute panel a, and a main panel a.
As shown in fig. 10, the channel management module in the server is used for managing each data transmission channel in the page debugging system. Each data transmission channel corresponds to a pair of debugging end and debugged end, each endpoint in each data transmission channel corresponds to a communication channel in which an endpoint is connected with the server, for example, the operating system a corresponds to the communication channel a, the debugging panel a corresponds to the communication channel B, and the attribute panel a corresponds to the communication channel C.
Each communication channel is used for transmitting transceiving messages, heartbeat detection and the like. The messages transmitted by each communication channel are messages of the same type in the page debugging process, for example, the communication channel corresponding to the debugging panel is used for transmitting messages related to page debugging, and the communication channel corresponding to the attribute panel is used for transmitting messages related to page attributes.
The server is also provided with a controller set (Group Controllers) and an information flow module (Message Stream), wherein the controller set comprises a plurality of Controllers, and each controller corresponds to each endpoint in the data transmission channel. For example, the script controller corresponds to the target script for transmitting information addressed to the target script, i.e., the controller of the second communication channel. The main panel controller corresponds to the main panel and is used for transmitting information sent to the main panel, namely the controller of the third communication channel. The debugging controller corresponds to the debugging panel and is used for transmitting information sent to the debugging panel, namely the controller of the fourth communication channel. The attribute controller corresponds to the attribute panel and is configured to transmit information sent to the attribute panel, that is, a controller of a fifth communication channel, where the fifth communication channel is a communication channel between the second terminal and the server and corresponds to the attribute panel of the page. The os controller corresponds to the os, and is configured to transmit information addressed to the os, that is, a controller of the sixth communication channel. The information flow module is used for receiving the messages from each communication channel and distributing the messages to the corresponding controllers.
The transmission process of the message in the server is as follows: each communication channel transmits the Message to the channel management module after receiving the Message, if the user has the requirement, the channel management module carries out customization processing on the received Message according to the requirement of the user, and then encapsulates the processed Message into a target Message format and sends the target Message format to a Message sending module (Message Sender). The Message encapsulation submodule (Message Wrapper) in the Message sending module encapsulates the received Message, for example, encapsulates the identifier of the web page view. And the message encapsulation submodule sends the encapsulated message to the information flow module. For any received message, the information flow module distributes the message to the corresponding controller according to the content of the message body, and the corresponding controller informs the channel management module to forward the message to the target communication channel.
For example, the communication channel a receives a debugging prompt message sent by the operating system, and the debugging prompt message is transmitted to the information flow module through the channel management module and the sending module. The information flow module sends the debugging prompt message to the controller corresponding to the main panel, and the controller corresponding to the main panel informs the channel management module of the debugging prompt message. And the channel management module takes the communication channel corresponding to the slave main panel as a target communication channel and sends the debugging prompt message from the target communication channel.
In addition, if a certain controller also sends a message to other controllers after receiving the message, the controller sends the message to the message management module. The message management module not only forwards the message to the communication channel corresponding to the controller, but also takes the message as a newly received message of the message management module, and redistributes the message until the message is redistributed to other controllers, and the other controllers retransmit the message.
The server is also provided with a storage module (Store), the storage module is used for setting information of the server, user information of users, corresponding relation between the debugging end and the debugged end, setting information of a data transmission channel and the like, and technicians can modify corresponding data in the storage module of the server.
Based on the server communication architecture shown in fig. 10, the server receives the debug request of the second terminal through the fourth communication channel, and the sending of the debug request of the second terminal to the first terminal includes the following steps a 1-A3.
In step a1, the channel management module in the server receives the debug request of the second terminal through the fourth communication channel, and sends the debug request to the information flow module.
For example, the channel management module receives the debug request from the fourth communication channel, if the user has a requirement, the channel management module performs customized processing on the received debug request according to the requirement of the user, and if the user has no requirement, the channel management module does not perform customized processing on the debug request. And then, the channel management module packages the debugging request into a target message format and sends the packaged debugging request to the message sending module. The message sending module carries out final encapsulation processing on the received debugging request and sends the encapsulated debugging request to the information flow module.
In step a2, the information flow module sends the debug request to the first controller according to the debug request.
The first controller is a controller corresponding to a communication channel between the first terminal and the server in the server.
After receiving the debugging request, the information flow module determines that a receiving end of the debugging request is a first terminal according to the content of the debugging request, so that the debugging request is distributed to the first controller.
In step a3, the first controller notifies the channel management module to send the debug request to a communication channel between the server and the first terminal.
The communication channel between the server and the first terminal is also a sixth communication channel.
And after receiving the debugging request, the first controller sends the received debugging request to the channel management module to inform the channel management module to send the debugging request to the corresponding sixth communication channel. And when the channel management module receives the debugging request from the first controller, the channel management module sends the debugging request to a sixth communication channel corresponding to the first controller according to the corresponding relation between the communication channel and the controller.
Based on the server communication architecture shown in fig. 10, the server receives the debug prompt message from the first terminal, and sends the debug prompt message to the second terminal through the third communication channel, including the following steps B1-B3.
In step B1, the channel management module in the server receives the debug prompt message from the first terminal and sends the debug prompt message to the information flow module.
For example, the channel management module receives the debug alert message from a sixth communication channel between the server and the first terminal. If the user has the requirement, the channel management module carries out customization processing on the received debugging prompt message according to the requirement of the user, and if the user does not have the requirement, the channel management module does not carry out customization processing on the debugging prompt message. And then, the channel management module packages the debugging prompt message into a target message format and sends the packaged debugging prompt message to the message sending module. The message sending module carries out final encapsulation processing on the received debugging prompting message and sends the encapsulated debugging prompting message to the information flow module.
In step B2, the information flow module sends the debug prompt message to the second controller corresponding to the third communication channel of the plurality of communication channels according to the debug prompt message.
The plurality of communication channels are communication channels between the server and the second terminal, and controllers corresponding to the plurality of communication channels in the server are called second controllers.
After receiving the debugging prompt message, the information flow module determines that the receiving end of the debugging request is a main panel in the second terminal according to the content of the debugging prompt message, and the main panel corresponds to the third communication channel, so that the information flow module distributes the debugging prompt message to the second controller corresponding to the third communication channel.
In step B3, the second controller notifies the channel management module to send the debug alert message to the third communication channel.
And after receiving the debugging prompt message, the second controller sends the received debugging prompt message to a channel management module so as to inform the channel management module to send the debugging prompt message to a corresponding third communication channel. And when the channel management module receives the debugging request from the second controller, the channel management module sends a debugging prompt message to a third communication channel corresponding to the second controller according to the corresponding relation between the communication channel and the controller.
Based on the server communication architecture shown in fig. 10, the server receives the debugging result of the first page from the first terminal, and sends the debugging result of the first page to the second terminal through the fourth communication channel, which includes the following steps C1-C3.
In step C1, the channel management module in the server receives the debugging result of the first page from the first terminal, and sends the debugging result to the information flow module.
For example, the channel management module receives the debugging result from a sixth communication channel between the server and the first terminal. If the user has the requirement, the channel management module carries out customization processing on the received debugging result according to the requirement of the user, and if the user does not have the requirement, the customization processing is not carried out on the debugging result. And then, the channel management module packages the debugging result into a target message format and sends the packaged debugging result to the message sending module. The message sending module carries out final encapsulation processing on the received debugging result and sends the encapsulated debugging result to the information flow module.
In step C2, the information flow module sends the debugging result to the second controller corresponding to the fourth communication channel of the plurality of communication channels according to the debugging result.
The plurality of communication channels are communication channels between the server and the second terminal.
After receiving the debugging result, the information flow module determines that the receiving end of the debugging result is a debugging panel in the second terminal according to the content of the debugging result, and the debugging panel corresponds to the fourth communication channel, so that the information flow module distributes the debugging result to the second controller corresponding to the fourth communication channel.
In step C3, the second controller notifies a channel management module to send the debug result to the fourth communication channel.
And after receiving the debugging result, the second controller sends the received debugging result to the channel management module so as to inform the channel management module to send the debugging result to the corresponding fourth communication channel. And when the channel management module receives the debugging result from the second controller, the channel management module sends a debugging prompt message to a fourth communication channel corresponding to the second controller according to the corresponding relation between the communication channel and the controller.
As can be seen from the above description of the property panel, the property panel is used to provide a page property function, wherein the page property includes at least one of a web page view state, a web page view performance, and a performance of a target application.
Based on the communication architecture of the server, with reference to different embodiments, the following description is made for the process of acquiring the web page view state, the web page view performance, and the performance of the target application in the page debugging process, respectively:
FIG. 11 is a flow diagram illustrating a container status data acquisition process according to an exemplary embodiment, the process comprising:
in step 1101, the first terminal sends a debugging prompting message to the server in response to a debugging prompting operation on a first page in the target application, wherein the debugging prompting message is used for prompting that the first page in the target application supports debugging.
Here, the process shown in step 1101 is the same as that shown in step 603 or step 702, and here, the embodiment of the present disclosure does not repeat step 1101 again.
In step 1102, the server receives a debug alert message from a first terminal.
For example, a sixth communication channel between the server and the first terminal receives the debug alert message.
In step 1103, the server sends the debug prompt message to the second terminal through a third communication channel, where the third communication channel corresponds to a main panel of the second terminal, and the main panel is used to provide a function of processing the debug prompt message.
The third communication channel is also the communication channel corresponding to the main panel in the data transmission channel corresponding to the first page. The server transmits the debug prompt message received from the sixth communication channel to the third communication channel based on the communication architecture in fig. 10, so that the debug message is transmitted to the second terminal. Since the process of message transmission in the server based on the communication architecture in fig. 10 is described above, it is not described here again.
It should be noted that, in the same manner as the process shown in step 605, the server may also transmit the debug prompt message received from the sixth communication channel to the third communication channel based on the communication architecture in fig. 10.
In step 1104, the second terminal receives a debugging prompt message of the first terminal sent by the server through a third communication channel.
In step 1105, the second terminal displays a main panel, and displays the attribute obtaining option and the address information of the first page carried by the debugging prompt message in the main panel.
Wherein the attribute acquisition option is used for triggering the display of an attribute panel. And displaying the corresponding main panel of the third communication channel after the second panel receives the debugging prompt message from the third communication channel because the third communication channel corresponds to the main panel, and displaying an adjustable list carried by the debugging prompt message in the panel.
And if the debuggable list carried by the debugging prompt message comprises the address information of the first page, displaying an attribute acquisition option, a debugging option and the address information of the first page in the main panel by the second terminal, wherein the attribute acquisition option and the debugging option both correspond to the address information of the first page.
If the debuggable list carried by the debugging prompt message comprises address information of at least one second page, the second terminal displays a plurality of attribute acquisition options, a plurality of debugging options and the debuggable list in the main panel, wherein each attribute acquisition option corresponds to the address information of one second page in the debuggable list, and each debugging option corresponds to the address information of one second page in the debuggable list.
In step 1106, the second terminal responds to the selection operation of the attribute acquisition option, and displays an attribute panel of the first page, wherein the attribute panel is used for providing the function of the webpage view state, and the attribute panel comprises a container state acquisition option.
Wherein the container status option is used to provide functionality for generating a container status acquisition request.
When the debuggable list displayed in the main panel includes address information of at least one second page, the user may select any page from the at least one second page to instruct to acquire attribute data of the page. For example, a page that the user can select in the main panel may be a first page that triggers the debug prompt message, or may also be a second page other than the first page in the debuggable list, and for convenience of description, the following description is given in the embodiment of the present disclosure by taking an example in which the user selects to acquire attribute data of the first page in the main panel:
And the second terminal responds to the second terminal to respond to the selection operation of the attribute acquisition option in the main panel and displays the attribute panel of the first page.
In step 1107, the second terminal sends a container status acquisition request to the server through a fifth communication channel in response to the selection operation of the container status acquisition option, where the container status acquisition request is used to instruct to acquire status data of the web page view of the first page, and the fifth communication channel corresponds to the property panel.
The state data of the webpage view is attribute data of a first page, and the state data of the webpage view comprises at least one of Bridge call stack information of the webpage view, basic state information of the webpage view, data (Cookie) information stored on a first terminal of the webpage view and Cookie operation logs. The bridging (Bridge) call stack information comprises input parameters and output parameters of the webpage view when the call stack is bridged. The basic state information of the web page view includes layout information of the web page view, such as background, color, and the like of the web page view, and the web page view setting information.
And the second terminal responds to the selection operation of the container state acquisition option and generates a container state acquisition request. And the second terminal establishes a fifth communication channel corresponding to the attribute panel, wherein the fifth communication channel is a communication channel between the second terminal and the server and corresponds to the attribute panel of the first page.
The second terminal also establishes a corresponding relation between the fifth communication channel and the webpage view of the first page to indicate that the fifth communication channel is a communication channel between the attribute panel of the first page and the server. For example, the second terminal adds the identifier of the web page view of the first page on the fifth communication channel to indicate that the fourth communication channel corresponds to the web page view.
And after the fifth communication channel is established, the second terminal sends the container state acquisition request to the fifth communication channel so that the container state acquisition request is transmitted to the server.
If the message format of the message transmitted in the fifth communication channel is the target message format, before sending the container state acquisition request, the second terminal firstly adopts the target message format to package the container state acquisition request, and then sends the packaged container state acquisition request to the fifth communication channel.
In step 1108, the server receives a container status acquiring request of the second terminal through a fifth communication channel.
The server receives the container state acquisition request from the fifth communication channel, and because the fifth communication channel carries the identification of the webpage view of the first webpage, the server can also add the identification of the webpage view of the first webpage into the container state acquisition request. And then sending a container state acquisition request carrying the identification of the webpage view to the first terminal.
Still based on fig. 10, the channel management module in the server receives the container status obtaining request of the second terminal through the fifth communication channel, and sends the container status obtaining request to the information flow module.
For example, the channel management module receives the container state acquisition request from the fifth communication channel, if the user has a requirement, the channel management module performs the customization processing on the received container state acquisition request according to the requirement of the user, and if the user does not have the requirement, the channel management module does not perform the customization processing on the container state acquisition request. And then, the channel management module packages the container state acquisition request into a target message format and sends the packaged container state acquisition request to the message sending module. The message sending module packages the identification of the webpage view to the container state acquisition request and sends the packaged container state acquisition request to the information flow module.
In step 1109, the server sends the container status acquisition request to the first terminal.
After receiving the container state acquisition request, the server determines that the first terminal is a debugged terminal based on the corresponding relationship between the device identifier of the second terminal and the device identifier of the first terminal, and then sends the container state acquisition request to a sixth communication channel between the first terminal and the server, so that the container state acquisition request is transmitted to the first terminal.
Still based on fig. 10, the information flow module sends the container status obtaining request to the first controller according to the received container status obtaining request, and the first controller notifies the channel management module to send the container status obtaining request to the communication channel between the server and the first terminal.
For example, after receiving the container status acquisition request, the information flow module determines, according to the content of the container status acquisition request, that a receiving end of the container status acquisition request is the first terminal, so as to distribute the container status acquisition request to the first controller. And after receiving the container state acquisition request, the first controller sends the received container state acquisition request to the channel management module so as to inform the channel management module to send the container state acquisition request to the corresponding sixth communication channel. When the channel management module receives a container state acquisition request from the first controller, the channel management module sends the container state acquisition request to a sixth communication channel corresponding to the first controller according to the corresponding relation between the communication channel and the controller.
In step 1110, the first terminal receives a container status acquisition request of the second terminal from the server.
For example, the first terminal receives the container status acquisition request from the sixth communication channel.
In step 1111, the first terminal acquires the status data of the web page view based on the container status acquisition request.
Taking the example that the operating system in the first terminal executes the step 1111, after receiving the container status obtaining request, the operating system obtains the status data of the web view based on the identifier of the web view carried by the container status obtaining request.
In one possible implementation, as shown in fig. 8, a container attribute module is provided in the operating system, and the implementation of this step 1111 is performed by the container attribute module.
In step 1112, the first terminal sends the status data of the web page view to the server.
And the first terminal sends the state data of the webpage view to the sixth communication channel, so that the state data of the webpage view is transmitted to the server.
If the message format of the message transmitted in the sixth communication channel is the first terminal in the target message format, before sending the state data of the web page view, the first terminal packages the state data of the web page view in the target message format, and then sends the packaged state data of the web page view to the sixth communication channel.
In step 1113, the server receives the status data of the web page view from the first terminal.
Still based on fig. 10, the channel management module in the server receives the status data of the web page view through the sixth communication channel, and sends the status data of the web page view to the information flow module.
For example, the channel management module receives the status data from the sixth communication channel, if the user has a requirement, the channel management module performs the customization processing on the received status data according to the requirement of the user, and if the user has no requirement, the channel management module does not perform the customization processing on the status data. And then, the channel management module packages the state data into a target message format and sends the packaged state data to the message sending module. The message sending module carries out final encapsulation processing on the received state data and sends the encapsulated state data to the information flow module.
In step 1114, the server sends the status data of the web page view to the second terminal through a fifth communication channel.
Still based on fig. 10, the information flow module sends the status data to a second controller corresponding to a fifth communication channel of the plurality of communication channels according to the received status data, and the second controller notifies the channel management module to send the status data to the fifth communication channel.
For example, after receiving the status data, the information flow module determines, according to the content of the status data, that the receiving end of the status data is an attribute panel in the second terminal, and the attribute panel corresponds to the fifth communication channel, so that the information flow module distributes the status data to the second controller corresponding to the fifth communication channel. And after receiving the state data, the second controller sends the received state data to the channel management module to inform the channel management module to send the state data to the corresponding fifth communication channel. And when the channel management module receives the state data from the second controller, the channel management module sends the state data to a fifth communication channel corresponding to the second controller according to the corresponding relation between the communication channel and the controller.
In step 1115, the second terminal receives the status data of the web page view sent by the server through the fifth communication channel.
For example, the second terminal receives the status data of the web page view from the fifth communication channel. And after receiving the state data of the webpage view, the second terminal displays the state data of the webpage view in an attribute panel corresponding to the fifth communication channel so as to be convenient for a user to view.
And when the attribute panel comprises a real time panel, the second terminal displays the real time corresponding to the attribute data of the first page in the real time panel. For example, in the real time panel, the real time corresponding to the status data of the web page view is displayed.
In the method provided by the embodiment of the disclosure, the front-end module of the debugging tool is provided with an attribute panel, and when a container state acquisition option in the attribute panel is selected, the second terminal is triggered to send a container state acquisition request for the page to the first terminal through the server, so that the first terminal returns state data of a webpage view of the page to the second terminal through the server based on the container state acquisition request, and the second terminal can also acquire the container state of the page in the page debugging process, thereby facilitating a user to check the container state of the page in real time.
FIG. 12 is a flow diagram illustrating a container performance data acquisition process according to an exemplary embodiment, the process comprising:
in step 1201, the first terminal sends a debugging prompting message to the server, where the debugging prompting message is used to prompt that the first page in the target application supports debugging.
Here, the procedure shown in step 1201 is the same as that shown in step 603 or step 702, and here, the embodiment of the present disclosure will not be described again for step 1201.
In step 1202, the server receives a debug alert message from a first terminal.
For example, the sixth communication channel between the server and the first terminal receives the debug alert message.
In step 1203, the server sends the debug prompt message to the second terminal through a third communication channel, where the third communication channel corresponds to a main panel of the second terminal, and the main panel is used to provide a function of processing the debug prompt message.
Here, the process in step 1203 is the same as that in step 1103, and here, the step 1203 is not described in detail in this disclosure.
In step 1204, the second terminal receives, through the third communication channel, a debugging prompt message of the first terminal sent by the server.
In step 1205, the second terminal displays a main panel, and displays the attribute acquisition option and the address information of the first page carried by the debug prompt message in the main panel.
Here, the process shown in step 1205 is the same as that shown in step 1105, and here, the step 1205 is not described in detail in this embodiment of the disclosure.
In step 1206, the second terminal responds to the selection operation of the attribute acquisition option, and displays an attribute panel of the first page, wherein the attribute panel is also used for providing a function of web page view performance, and the attribute panel also comprises a container performance acquisition option.
The container status option is used to provide a function for generating a container performance obtaining request, where the container performance obtaining request is related to the introduction of step 1207. The process in step 1206 is the same as that in step 1106, and herein, the embodiment of the disclosure does not repeat step 1206 again.
In step 1207, in response to the selection operation of the container performance obtaining option, the second terminal sends a container performance obtaining request to the server through the fifth communication channel, where the container performance obtaining request is used to instruct to obtain performance data of the web page view of the first page, and the fifth communication channel corresponds to the property panel.
The web view performance data is attribute data of the first page, and the web view performance data includes a resource amount occupied by the web view, for example, at least one of a processing resource amount of a processor occupied by the web view, a memory occupied by a script (JavaScript, JS) of the web view, and a memory occupied by a Native of the web view. The processor includes at least one of a Central Processing Unit (CPU) and a Graphics Processing Unit (GPU).
And the second terminal responds to the selection operation of the container performance acquisition option to generate a container performance acquisition request. And if the second terminal has established a fifth communication channel corresponding to the attribute panel, the second terminal sends the container performance acquisition request to the fifth communication channel, so that the container performance acquisition request is transmitted to the server. And if the second terminal does not establish the fifth communication channel corresponding to the attribute panel, the second terminal establishes the fifth communication channel first, and sends the container performance acquisition request to the fifth communication channel after the fifth communication channel is established. The process of establishing the fifth communication channel is described in 1107, and is not described herein.
Optionally, before sending the container performance obtaining request, the second terminal encapsulates the container performance obtaining request into a target message format, and sends the encapsulated container performance obtaining request to the fifth communication channel.
In step 1208, the server receives a container capability obtaining request of the second terminal through a fifth communication channel.
For example, the server receives the container performance obtaining request from the fifth communication channel, and since the fifth communication channel carries the identifier of the web page view of the first web page, the server can also add the identifier of the web page view of the first web page in the container performance obtaining request. And then sending a container performance acquisition request carrying the identification of the webpage view to the first terminal.
Still based on fig. 10, the channel management module in the server receives the container performance obtaining request of the second terminal through the fifth communication channel, and sends the container performance obtaining request to the information flow module.
For example, the channel management module receives the container performance obtaining request from the fifth communication channel, if the user has a requirement, the channel management module performs the customization processing on the received container performance obtaining request according to the requirement of the user, and if the user does not have the requirement, the channel management module does not perform the customization processing on the container performance obtaining request. And then, the channel management module packages the container performance acquisition request into a target message format and sends the packaged container performance acquisition request to the message sending module. The message sending module packages the identification of the webpage view to the container performance acquisition request, and sends the packaged container performance acquisition request to the information flow module.
In step 1209, the server sends the container capability get request to the first terminal.
After receiving the container performance acquisition request, the server determines that the first terminal is a debugged terminal based on the corresponding relationship between the device identifier of the second terminal and the device identifier of the first terminal, and then sends the container performance acquisition request to a sixth communication channel between the server and the first terminal, so that the container performance acquisition request is transmitted to the first terminal.
Still based on fig. 10, the information flow module sends the container performance obtaining request to the first controller according to the received container performance obtaining request, and the first controller notifies the channel management module to send the container performance obtaining request to the communication channel between the server and the first terminal.
For example, after receiving the container performance obtaining request, the information flow module determines, according to the content of the container performance obtaining request, that a receiving end of the container performance obtaining request is the first terminal, so as to distribute the container performance obtaining request to the first controller. After receiving the container performance acquisition request, the first controller sends the received container performance acquisition request to the channel management module to notify the channel management module to send the container performance acquisition request to the corresponding sixth communication channel. When the channel management module receives the container performance acquisition request from the first controller, the channel management module sends the container performance acquisition request to a sixth communication channel corresponding to the first controller according to the corresponding relation between the communication channel and the controller.
In step 1210, the first terminal receives a container capability acquisition request of the second terminal from the server.
For example, the first terminal receives the container capability acquisition request from the sixth communication channel.
In step 1211, the first terminal obtains performance data of the web page view based on the container performance obtaining request.
If the performance data of the web page view includes the resource amount occupied by the web page view, the first terminal acquires the resource amount occupied by the web page view from a memory-ifra in a web browser web page view kernel of the first terminal based on the container performance acquisition request. It should be noted that, a technician performs secondary development on the web page view kernel in advance to extract and assemble the fields affected by the front end in the memory analysis tool, and returns the assembled fields to the memory analysis tool, so that the subsequent memory analysis tool can acquire the performance data of the web page view.
In one possible implementation, this step 1211 is performed by an operating system in the first terminal. And if a first communication channel corresponding to the webpage view of the first page exists between the webpage browsing webpage view kernel and the operating system, the operating system sends the container performance acquisition request to the webpage view kernel through the first communication channel so as to instruct to acquire the performance data of the webpage view of the first page. The user executes at least one operation on the first page, and a memory analysis tool in a webpage view kernel samples the resource consumption, the JS memory usage and the Native memory usage of the processor after receiving a container performance acquisition request, so that the initial value and the end value of the resource consumption, the JS memory usage and the Native memory usage of the processor are obtained when the webpage view responds to the at least one operation. The memory analysis tool uses the obtained data as performance data of the webpage view, sends the performance data of the webpage view to an operating system through the first communication channel, and correspondingly, the operating system receives the performance data of the webpage view from the first communication channel.
The initial values of the resource consumption amount, the JS occupied memory and the Native occupied memory of the processor refer to the values of the resource consumption amount, the JS occupied memory and the Native occupied memory of the processor before the webpage view responds to the at least one operation, and the end values of the resource consumption amount, the JS occupied memory and the Native occupied memory of the processor refer to the values of the resource consumption amount, the JS occupied memory and the Native occupied memory of the processor after the webpage view responds to the at least one operation.
In one possible implementation, as shown in fig. 8, a container attribute module is provided in the operating system, and this step 1211 is performed by the container attribute module.
In step 1212, the first terminal sends performance data of the web page view to the server.
And the first terminal sends the performance data of the webpage view to the sixth communication channel, so that the performance data of the webpage view is transmitted to the server.
If the message format of the message transmitted in the sixth communication channel is the target message format, the first terminal encapsulates the performance data of the web view by using the target message format before sending the state data of the web view, and then sends the encapsulated performance data of the web view to the sixth communication channel.
In step 1213, the server receives performance data for the web page view from the first terminal.
Still based on fig. 10, the channel management module in the server receives the performance data of the web page view through the sixth communication channel, and sends the performance data of the web page view to the information flow module.
For example, the channel management module receives the performance data from the sixth communication channel, if the user has a requirement, the channel management module performs the customization processing on the received performance data according to the requirement of the user, and if the user has no requirement, the channel management module does not perform the customization processing on the performance data. And then, the channel management module packages the performance data into a target message format and sends the packaged performance data to the message sending module. The message sending module carries out final encapsulation processing on the received performance data and sends the encapsulated performance data to the information flow module.
In step 1214, the server sends the performance data of the web page view to the second terminal through a fifth communication channel.
Still based on fig. 10, the information flow module sends the performance data to a second controller corresponding to a fifth communication channel of the plurality of communication channels according to the received performance data, and the second controller notifies the channel management module to send the performance data to the fifth communication channel.
For example, after receiving the performance data, the information flow module determines, according to the content of the performance data, that a receiving end of the performance data is an attribute panel in the second terminal, and the attribute panel corresponds to the fifth communication channel, so that the information flow module distributes the performance data to the second controller corresponding to the fifth communication channel. And after receiving the performance data, the second controller sends the received performance data to the channel management module to inform the channel management module to send the performance data to the corresponding fifth communication channel. And when the channel management module receives the performance data from the second controller, sending the performance data to a fifth communication channel corresponding to the second controller according to the corresponding relation between the communication channel and the controller.
In step 1215, the second terminal receives the performance data of the web view transmitted by the server through the fifth communication channel.
For example, the second terminal receives performance data of the web page view from the fifth communication channel. And after receiving the performance data of the webpage view, the second terminal displays the performance data of the webpage view in an attribute panel corresponding to the fifth communication channel so as to be convenient for a user to view.
In one possible implementation, when the second terminal receives the performance data of the web page view, the second terminal counts the variation of the performance data of the web page view before and after the response of the web page view to the at least one operation of the first page by the user based on the performance data of the web page view. For example, the second terminal takes a difference between the end value and the initial value of the resource consumption amount of the processor as the amount of change in the processing resource consumption of the processor. Or calculating a target percentile between an end value and an initial value of the resource consumption of the processor. Wherein the target percentile is for example P50 or P90. The variation of other performance data of the web page view is calculated in a manner similar to the resource consumption of the processor, and is not described herein again.
After counting the variation of the performance data of the web view before and after the web view responds to at least one operation of the user on the first page, the second terminal also displays the variation of the performance data of the web view in the attribute panel, and the user can learn through the variation: an impact of at least one operation on a first page on performance of a web page view of the first page.
And when the attribute panel comprises a real time panel, the second terminal displays the real time corresponding to the attribute data of the first page in the real time panel. For example, in the real time panel, the real time corresponding to the performance data of the web page view is displayed.
In the method provided by the embodiment of the disclosure, the front-end module of the debugging tool is provided with an attribute panel, and when a container performance acquisition option in the attribute panel is selected, the second terminal is triggered to send a container performance acquisition request for the page to the first terminal through the server, so that the first terminal returns performance data of a webpage view of the page to the second terminal through the server based on the container performance acquisition request, and the second terminal can also acquire the container performance of the page in the page debugging process, thereby facilitating a user to check the container performance of the page in real time.
FIG. 13 is a flowchart illustrating application performance data acquisition, according to an example embodiment, including:
in step 1301, the first terminal sends a debugging prompting message to the server, where the debugging prompting message is used to prompt that the first page in the target application supports debugging.
Here, the step 1301 is similar to the process shown in the step 603 or the step 702, and here, the step 1301 is not described again in this embodiment of the disclosure.
In step 1302, the server receives a debug alert message from a first terminal.
For example, the sixth communication channel between the server and the first terminal receives the debug alert message.
In step 1303, the server sends the debug prompt message to the second terminal through a third communication channel, where the third communication channel corresponds to a main panel of the second terminal, and the main panel is used to provide a function of processing the debug prompt message.
In one possible embodiment, the server transmits the debug prompt message received from the sixth communication channel to the third communication channel based on the communication architecture in fig. 10, so that the debug message is transmitted to the second terminal. Since the process of message transmission in the server based on the communication architecture in fig. 10 is described above, it is not described herein again.
It should be noted that, in step 1303, the same process as that shown in step 605 is performed, and in step 605, the server may also transmit the debug prompt message received from the sixth communication channel to the third communication channel based on the communication architecture in fig. 10.
In step 1304, the second terminal receives a debugging prompt message of the first terminal sent by the server through the third communication channel.
In step 1305, the second terminal displays a main panel, and displays the attribute obtaining option and the address information of the first page carried by the debug prompt message in the main panel.
Here, the process shown in step 1305 is the same as that shown in step 1105, and here, the step 1305 is not described in detail in this disclosure.
In step 1306, the second terminal selects the property obtaining option to display a property panel of the first page, the property panel is further used for providing a function of the performance of the target application, and the property panel further includes an application performance obtaining option.
The application performance obtaining option is used to provide a function of generating an application performance obtaining request, where the related introduction of the application performance obtaining request is shown in step 1307.
In step 1307, the second terminal sends, in response to the operation of selecting the application performance obtaining option, an application performance obtaining request to the server through the fifth communication channel, where the application performance obtaining request is used to instruct to obtain performance data of the target application, and the fifth communication channel corresponds to the attribute panel.
The state data of the target application is attribute data of the first page, the performance data of the target application comprises resource amount occupied by the target application, and the resource occupied by the target application comprises at least one of memory size occupied by the target application and CPU time occupied by the target application.
And the second terminal responds to the selection operation of the application performance acquisition option and generates an application performance acquisition request. If the second terminal has established the fifth communication channel corresponding to the attribute panel, the second terminal sends the container performance acquisition request to the fifth communication channel, so that the container performance acquisition request is transmitted to the server. If the second terminal does not establish the fifth communication channel corresponding to the attribute panel, the second terminal establishes the fifth communication channel first, and sends the application performance acquisition request to the fifth communication channel after the fifth communication channel is established. The process of establishing the fifth communication channel is described in 1107, and is not described herein.
If the message format of the message transmitted in the fifth communication channel is the target message format, before sending the application performance acquisition request, the second terminal firstly adopts the target message format, encapsulates the application performance acquisition request, and then sends the encapsulated application performance acquisition request to the fifth communication channel.
In step 1308, the server receives the application capability obtaining request of the second terminal through a fifth communication channel.
For example, the server receives the application performance obtaining request from the fifth communication channel, and since the fifth communication channel carries the identifier of the web page view of the first web page, the server can also add the identifier of the web page view of the first web page to the application performance obtaining request. And then sending an application performance acquisition request carrying the identification of the webpage view to the first terminal.
Still based on fig. 10, the channel management module in the server receives the application performance obtaining request of the second terminal through the fifth communication channel, and sends the application performance obtaining request to the information flow module.
For example, the channel management module receives the application performance obtaining request from the fifth communication channel, if the user has a requirement, the channel management module performs the customization processing on the received application performance obtaining request according to the requirement of the user, and if the user does not have the requirement, the channel management module does not perform the customization processing on the application performance obtaining request. And then, the channel management module packages the application performance acquisition request into a target message format and sends the packaged application performance acquisition request to the message sending module. The message sending module packages the identification of the webpage view to the application performance acquisition request and sends the packaged application performance acquisition request to the information flow module.
In step 1309, the server sends the application capability obtaining request to the first terminal.
After receiving the application performance obtaining request, the server determines that the first terminal is a debugged terminal based on the corresponding relationship between the device identifier of the second terminal and the device identifier of the first terminal, and then sends the application performance obtaining request to a sixth communication channel between the server and the first terminal, so that the application performance obtaining request is transmitted to the first terminal.
Still based on fig. 10, the information flow module sends the application performance obtaining request to the first controller according to the received application performance obtaining request, and the first controller notifies the channel management module to send the application performance obtaining request to the communication channel between the server and the first terminal.
For example, after receiving the application performance obtaining request, the information flow module determines, according to the content of the application performance obtaining request, that a receiving end of the application performance obtaining request is the first terminal, so as to distribute the application performance obtaining request to the first controller. After receiving the application performance obtaining request, the first controller sends the received application performance obtaining request to the channel management module to notify the channel management module to send the application performance obtaining request to the corresponding sixth communication channel. When the channel management module receives the application performance acquisition request from the first controller, the channel management module sends the application performance acquisition request to a sixth communication channel corresponding to the first controller according to the corresponding relationship between the communication channels and the controllers.
In step 1310, the first terminal receives an application capability obtaining request of the second terminal from the server.
For example, the first terminal receives the application capability acquisition request from the sixth communication channel.
In step 1311, the first terminal acquires the performance data of the target application based on the application performance acquisition request.
If the performance data of the target application includes the resource amount occupied by the target application, the first terminal acquires the resource amount occupied by the target application from a debug memory information (debug. memoryinfo) class in an operating system of the first terminal based on the application performance acquisition request.
Taking the case that the operating system in the first terminal executes step 1311, after receiving the application performance obtaining request, the operating system reads the performance data of the current target application from the debug memory information class based on the application performance obtaining request.
In one possible implementation, as shown in fig. 8, an application performance module is provided in the operating system, and this step 1311 is performed by the application performance module.
In step 1312, the first terminal sends the performance data of the target application to the server.
And the first terminal sends the performance data of the target application to the sixth communication channel, so that the performance data of the target application is transmitted to the server.
If the format of the message transmitted in the sixth communication channel is the target message format, before sending the performance data of the target application, the first terminal firstly adopts the target message format to package the performance data of the target application, and then sends the packaged performance data of the target application to the fifth communication channel.
In step 1313, the server receives performance data for the target application from the first terminal.
Still based on fig. 10, the channel management module in the server receives the performance data of the target application through the sixth communication channel, and sends the performance data of the target application to the information flow module.
For example, the channel management module receives the performance data from the sixth communication channel, if the user has a requirement, the channel management module performs the customization processing on the received performance data according to the requirement of the user, and if the user has no requirement, the channel management module does not perform the customization processing on the performance data. And then, the channel management module packages the performance data into a target message format and sends the packaged performance data to the message sending module. The message sending module carries out final encapsulation processing on the received performance data and sends the encapsulated performance data to the information flow module.
In step 1314, the server sends the performance data of the target application to the second terminal through a fifth communication channel.
Still based on fig. 10, the information flow module sends the performance data to a second controller corresponding to a fifth communication channel of the plurality of communication channels according to the received performance data, and the second controller notifies the channel management module to send the performance data to the fifth communication channel.
For example, after receiving the performance data, the information flow module determines, according to the content of the performance data, that a receiving end of the performance data is an attribute panel in the second terminal, and the attribute panel corresponds to the fifth communication channel, so that the information flow module distributes the performance data to the second controller corresponding to the fifth communication channel. And after receiving the performance data, the second controller sends the received performance data to the channel management module to inform the channel management module to send the performance data to the corresponding fifth communication channel. And when the channel management module receives the performance data from the second controller, sending the performance data to a fifth communication channel corresponding to the second controller according to the corresponding relation between the communication channel and the controller.
In step 1315, the second terminal receives the performance data of the target application sent by the server through the fifth communication channel.
For example, the second terminal receives performance data of the target application from the fifth communication channel. And after receiving the performance data of the target application, the second terminal displays the performance data of the target application in an attribute panel corresponding to the fifth communication channel so as to be convenient for a user to view.
And when the attribute panel comprises a real time panel, the second terminal displays the real time corresponding to the attribute data of the first page in the real time panel. For example, in the real time panel, the real time corresponding to the performance data of the target application is displayed.
In the method provided by the embodiment of the disclosure, the front-end module of the debugging tool is provided with an attribute panel, and when an application performance acquisition option in the attribute panel is selected, the second terminal is triggered to pass through the server and send an application performance acquisition request for the target application to the first terminal, so that the first terminal returns performance data of the target application to the second terminal through the server based on the application performance acquisition request, and the second terminal can also acquire the performance condition of the target application in the page debugging process, thereby facilitating the user to check the performance condition of the target application in real time.
In a possible implementation manner, in a case that the attribute panel corresponding to the first page includes an offline package panel, the offline package panel is configured to provide offline page code of the first page, and the offline package panel includes an execution option, where the execution option is configured to provide a function of executing the offline page code. And the second terminal responds to the selection operation of the operation option in the offline package panel, operates the offline page code of the first page and displays the first page so that a user can view the first page at the second terminal at any time.
In a possible implementation manner, in the above flowcharts, the steps performed by the first terminal are performed by an operating system in the first terminal, and in order to further embody the steps performed by the operating system in the page debugging process and the interaction flow between the devices in the page debugging system, reference is made to a communication flowchart in the page debugging process shown in fig. 14 according to an exemplary embodiment.
As shown in fig. 14, after the server opens the debugging permission of the first terminal for the second terminal, if the user selects to open a page of a certain application program, the operating system of the first terminal creates a web page view for the page in response to the opening operation on the page, generates an identifier of the web page view, and adds the identifier of the web page view to the address information of the page. Then, the operating system informs the message management module of the identification of the webpage view, and informs the message management module to create a first communication channel from the operating system to a webpage view kernel for the webpage view. And after receiving the notification, the message management module requests the webpage view kernel to acquire the debuggable list of the application program. And after receiving the message management module, the webpage view kernel returns the debuggable list of the application program to the message management module. The message management module inquires address information of a page opened by a user from the debuggable list based on the identification of the webpage view, creates a Local Socket (namely a first communication channel) for the webpage view based on the address information of the page and the identification of the webpage view, and upgrades a communication protocol of the Local Socket into a Websocket communication protocol. The message management module then sends the list of debuggable applications to the second terminal via the server. The second terminal displays the debuggable list of the application program in the main panel, and the user performs selection operation in the main panel to trigger the second terminal to send a corresponding request message (such as a debugging request, a container state acquisition request, a container performance acquisition request or an application performance acquisition request) to the server. And the server receives the request message, adds the webpage view identifier of the corresponding page in the request message, and sends the request message to a message management module in the operating system. And after receiving the request message, the message management module decodes the request message, and encodes the request message into a WebSocke message by adopting a data format of a WebSocke communication protocol. And the message management module sends a WebSocket message to the Local Socket corresponding to the webpage view based on the identification of the webpage view carried by the request message. Correspondingly, the webpage view kernel receives the WebSocke message from the Local socket, analyzes the WebSocke message, executes the content of the WebSocke message, and returns an execution result to the message management module through the Local socket. The message management module decodes the received execution result, re-encapsulates the execution result into a target message format, and sends the encapsulated execution result to the server. The server forwards the execution result to a communication channel corresponding to the identification of the webpage view, and the second terminal receives the execution result from the communication channel and displays the received execution result.
Fig. 15 is a block diagram illustrating a page debugging apparatus according to an example embodiment. Referring to fig. 15, the apparatus 1500 applied to a first terminal includes:
a first sending unit 1501, configured to perform a debugging prompting operation on a first page in a target application, and send, by a server, a debugging prompting message to a second terminal, where the debugging prompting message is used for prompting that the first page in the target application supports debugging;
a receiving unit 1502 configured to perform receiving, from the server, a debugging request of the second terminal, where the debugging request is used for instructing to debug the first page;
an obtaining unit 1503 configured to perform obtaining a debugging result of the first page based on the debugging request;
the second sending unit 1504 is further configured to send, by the server, the debugging result of the first page to the second terminal.
In a possible implementation manner, the web view mounted on the first page corresponds to a first communication channel, and the first communication channel is a communication channel between an operating system of the first terminal and a web view kernel; the obtaining unit 1503 is configured to perform:
Sending the debugging request to the webpage view kernel through the first communication channel corresponding to the webpage view, and debugging the first page by the webpage view kernel based on the debugging request to obtain a debugging result of the first page;
and receiving a debugging result of the first page sent by the debugging front end through the first communication channel corresponding to the webpage view.
In a possible implementation, the apparatus 1500 further comprises a creating unit;
the obtaining unit 1503 is further configured to execute a debugging prompt operation for responding to a first page in a target application, and obtain a webpage view for mounting the first page;
the creating unit is configured to perform creating the first communication channel corresponding to the webpage view.
In one possible embodiment, the creating unit includes:
the acquisition subunit is configured to execute to respond to a debugging prompt operation of a first page in a target application and acquire address information of the first page, wherein the address information comprises an identifier of the webpage view;
a creating subunit configured to perform creating a first communication channel between the operating system and the web view kernel;
The creating subunit is further configured to perform to establish a correspondence between the address information and the created first communication channel.
In one possible embodiment, the obtaining subunit is configured to perform:
responding to a debugging prompt operation of a first page in a target application, and sending an address acquisition request to a webpage view kernel, wherein the address acquisition request is used for indicating to acquire address information of a page which supports debugging and is mounted in a webpage view in the target application;
receiving address information of at least one second page from the web page view kernel;
and inquiring the address information of the first page from the address information of the at least one second page based on the identification of the webpage view.
In one possible embodiment, the first communication channel is a local socket; the device further comprises:
an updating unit configured to perform updating of a communication protocol of the first communication channel from a hypertext transfer protocol to a web socket protocol;
the second sending unit is further configured to execute sending the debugging request to the first communication channel through the network socket protocol.
In a possible implementation manner, the receiving unit 1502 is further configured to perform receiving, from the server, a container state obtaining request of the second terminal, where the container state obtaining request is used to instruct to obtain state data of a webpage view mounted on the first page;
the obtaining unit 1503 is further configured to execute obtaining of the state data of the web page view based on the container state obtaining request;
the second sending unit 1504 is further configured to execute sending, by the server, the status data of the web page view to the second terminal.
In a possible implementation manner, the receiving unit 1502 is further configured to perform receiving, from the server, a container performance obtaining request of the second terminal, where the container performance obtaining request is used to indicate to obtain performance data of a webpage view mounted on the first page;
the obtaining unit 1503 is further configured to execute obtaining performance data of the web page view based on the container performance obtaining request;
the second sending unit 1504 is further configured to execute sending, by the server, the performance data of the web page view to the second terminal.
In a possible implementation manner, the performance data of the web page view includes an amount of resources occupied by the web page view;
the obtaining unit 1503 is further configured to execute, based on the container performance obtaining request, obtaining, from a memory analysis tool in a kernel of a web browser of the first terminal, a resource amount occupied by the web view.
In a possible implementation manner, the receiving unit 1502 is further configured to perform receiving, from the server, an application performance obtaining request of the second terminal, where the application performance obtaining request is used to instruct to obtain performance data of the target application;
the obtaining unit 1503 is further configured to execute obtaining performance data of the target application based on the application performance obtaining request;
the second sending unit 1504 is further configured to execute sending, by the server, the performance data of the target application to the server.
In one possible implementation, the performance data of the target application includes an amount of resources occupied by the target application;
the obtaining unit 1503 is further configured to execute obtaining, based on the application performance obtaining request, the resource amount occupied by the target application from the debug memory information class in the operating system of the first terminal.
In one possible implementation, the apparatus 1500 further comprises:
and the injection unit is configured to execute a step of responding to a debugging prompt operation of a first page in a target application, injecting a target script into the page code of the first page, executing a debugging request of the second terminal received from the server by the target script, acquiring a debugging result of the first page based on the debugging request, and sending the debugging result of the first page to the second terminal through the server.
In a possible implementation manner, the webpage view mounted on the first page corresponds to a second communication channel, and the second communication channel is a communication channel between the server and the target script;
the target script receiving the debugging request of the second terminal from the server comprises:
the target script receives a debugging request of the second terminal from the server through the second communication channel;
the sending, by the target script through the server, the debugging result of the first page to the second terminal includes:
and the target script sends the debugging result of the first page to the server through the second communication channel, and the server sends the debugging result of the first page to the second terminal.
In a possible implementation manner, the target script includes an information module and a target hijacking module, the target hijacking module includes a target hijacking method, and the target hijacking method is used for providing a page debugging function for an operating system of the first terminal; the target script receives a debugging request of the second terminal from the server, and the obtaining of the debugging result of the first page based on the debugging request comprises:
the information module receives a debugging request of the second terminal from the server through the second communication channel;
the information module sends the debugging request to the target hijack module;
and the target hijacking module acquires the debugging result of the first page based on the received debugging request and the target hijacking method.
In a possible implementation, the target script includes at least one agent module and at least one specific hijacking module, each agent module corresponds to one specific hijacking module, each specific hijacking module includes a specific hijacking method, and each specific hijacking method is used for providing a page debugging function for an operating system;
The target hijacking module is one of the at least one specific hijacking module, and the target hijacking module corresponds to a target agent module in the at least one agent module;
the step of sending the debugging request to the target hijacking module by the information module comprises the following steps:
the information module sends the debugging request to the target agent module;
and the target agent module receives the debugging request and sends the received debugging request to the target hijacking module.
In a possible implementation manner, the target hijacking module is a public hijacking module in the target script, the target hijacking method is a public hijacking method included in the public hijacking module, the public hijacking method is used for providing a page debugging function, and the page debugging function is applicable to various operating systems.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 16 is a block diagram illustrating a page debugging apparatus according to an example embodiment. Referring to fig. 16, according to a fifth aspect of the embodiments of the present disclosure, there is provided a page debugging apparatus applied to a server, where the apparatus 1600 includes:
A receiving unit 1601 configured to perform receiving a debugging prompting message from the first terminal, the debugging prompting message being used for prompting a first page in a target application of the first terminal to support debugging;
a sending unit 1602, configured to execute sending the debugging prompting message to a second terminal through a third communication channel, where the third communication channel corresponds to a main panel of the second terminal, and the main panel is used to provide a function of processing the debugging prompting message;
the receiving unit 1601 is further configured to execute receiving, through a fourth communication channel, a debugging request of the second terminal, where the debugging request is used to instruct to debug the first page, and the fourth communication channel corresponds to a debugging panel of the second terminal, and the debugging panel is used to provide a function of page debugging;
the sending unit 1602, further configured to execute sending a debugging request of the second terminal to the first terminal;
the receiving unit 1601 is further configured to perform receiving a debugging result of the first page from the first terminal;
the sending unit 1602 is further configured to execute sending the debugging result of the first page to the second terminal through the fourth communication channel.
In one possible embodiment, the server includes a channel management module, an information flow module, and a first controller, where the first controller corresponds to a communication channel between the server and the first terminal;
the receiving unit 1601 is further configured to perform receiving a debugging request of the second terminal through a fourth communication channel based on the channel management module, and sending the debugging request to the information flow module;
the sending unit 1602, configured to execute sending, based on the information flow module, the debug request to the first controller according to the debug request, and notifying, by the first controller, the channel management module to send the debug request to a communication channel between the server and the first terminal.
In a possible implementation manner, a plurality of communication channels exist between the server and the second terminal, the server includes a channel management module, an information flow module, and a plurality of second controllers, and the plurality of second controllers respectively correspond to the plurality of communication channels;
the receiving unit 1601 is further configured to execute sending a debug prompt message to the information flow module based on the channel management module receiving the debug prompt message from the first terminal;
The sending unit 1602 is further configured to execute sending, based on the information flow module, the debugging prompt message to a second controller corresponding to the third communication channel in the multiple communication channels according to the debugging prompt message, where the second controller notifies the channel management module to send the debugging prompt message to the third communication channel.
In a possible implementation manner, a plurality of communication channels exist between the server and the second terminal, the server includes a channel management module, an information flow module, and a plurality of second controllers, and the plurality of second controllers respectively correspond to the plurality of communication channels;
the receiving unit 1601 is further configured to perform sending the debugging result to the information flow module based on the channel management module receiving the debugging result of the first page from the first terminal;
the sending unit 1602 is further configured to execute sending, based on the information flow module, the debugging result to a second controller corresponding to the fourth communication channel in the multiple communication channels according to the debugging result, where the second controller notifies the channel management module to send the debugging result to the fourth communication channel.
In a possible implementation manner, the receiving unit 1601 is further configured to execute receiving, by a fifth communication channel, a container status obtaining request of the second terminal, where the container status obtaining request is used for indicating to obtain status data of a web view mounted on the first page, and the fifth communication channel corresponds to an attribute panel of the second terminal, where the attribute panel is used for providing a function of a web view status;
the sending unit 1602, further configured to execute sending the container status obtaining request to the first terminal;
the receiving unit 1601 is further configured to perform receiving state data of the web page view from the first terminal;
the sending unit 1602 is further configured to execute sending the status data of the web page view to the second terminal through a fifth communication channel.
In a possible implementation manner, a plurality of communication channels exist between the server and the second terminal, the server includes a channel management module, an information flow module, and a plurality of second controllers, and the plurality of second controllers respectively correspond to the plurality of communication channels;
the receiving unit 1601 is further configured to perform sending the status data to the information flow module based on the channel management module receiving the status data from the first terminal;
The sending unit 1602 is further configured to execute sending, based on the information flow module, the status data to a second controller corresponding to the fifth communication channel in the plurality of communication channels according to the status data, where the second controller notifies the channel management module to send the status data to the fifth communication channel.
In a possible implementation manner, the receiving unit 1601 is further configured to perform receiving, by a fifth communication channel, a container performance obtaining request of the second terminal, where the container performance obtaining request is used to indicate to obtain performance data of a web view mounted on the first page, and the fifth communication channel corresponds to an attribute panel of the second terminal, where the attribute panel is used to provide a function of web view performance;
the sending unit 1602, further configured to execute sending the container performance obtaining request to the first terminal;
the receiving unit 1601 is further configured to perform receiving performance data of the web page view from the first terminal;
the sending unit 1602 is further configured to execute sending, to the second terminal, the performance data of the web page view through the fifth communication channel.
In a possible implementation manner, a plurality of communication channels exist between the server and the second terminal, the server includes a channel management module, an information flow module, and a plurality of second controllers, and the plurality of second controllers respectively correspond to the plurality of communication channels;
the receiving unit 1601 is further configured to perform sending the status data to the information flow module based on the channel management module receiving the status data from the first terminal;
the sending unit 1602, configured to execute sending, based on the information flow module, the status data to a second controller corresponding to the fifth communication channel of the plurality of communication channels according to the status data, where the second controller notifies the channel management module to send the status data to the fifth communication channel.
In a possible implementation manner, the receiving unit 1601 is further configured to execute receiving, by a fifth communication channel, an application performance obtaining request of the second terminal, where the application performance obtaining request is used for instructing to obtain performance data of the target application, and the fifth communication channel corresponds to an attribute panel of the second terminal, where the attribute panel is used for providing a function of the performance of the target application;
The sending unit 1602, further configured to execute sending the application performance obtaining request to the first terminal;
the receiving unit 1601 is further configured to perform receiving, from the first terminal, performance data of the target application;
the sending unit 1602, further configured to execute sending, to the second terminal, the performance data of the target application through the fifth communication channel;
in a possible implementation manner, a plurality of communication channels exist between the server and the second terminal, the server includes a channel management module, an information flow module, and a plurality of second controllers, and the plurality of second controllers respectively correspond to the plurality of communication channels;
the receiving unit 1601 is further configured to perform sending the performance data to the information flow module based on the channel management module receiving the performance data from the first terminal;
the sending unit 1602, configured to execute sending, based on the information flow module, the performance data to a second controller corresponding to the fifth communication channel of the plurality of communication channels according to the performance data, where the second controller notifies the channel management module to send the performance data to the fifth communication channel.
With respect to the apparatus 1600 in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment related to the method, and will not be described in detail here.
Fig. 17 is a block diagram illustrating a page debugging apparatus in accordance with an example embodiment. Referring to fig. 17, the apparatus 1700, applied to a second terminal, includes:
a receiving unit 1701, configured to execute receiving, by a third communication channel, a debugging prompting message of a first terminal sent by a server, the debugging prompting message being used for prompting a first page in a target application of the first terminal to support debugging, where the third communication channel corresponds to a main panel of the second terminal, and the main panel is used for providing a function of processing the debugging prompting message;
a sending unit 1702, configured to execute, in response to the debugging operation on the first page, sending, to the server, a debugging request through a fourth communication channel, where the debugging request is used to instruct to debug the first page, and the fourth communication channel corresponds to a debugging panel of the second terminal, where the debugging panel is used to provide a function of page debugging;
The receiving unit 1701 is further configured to receive, through the fourth communication channel, a debugging result of the first page sent by the server.
In one possible implementation, the apparatus 1700 further comprises:
the first display unit is configured to be executed in the main panel and display debugging options and address information of the first page carried by the debugging prompt message;
the first display unit is further configured to execute a selection operation for responding to the debugging option in the main panel, and display the debugging panel, wherein the debugging panel comprises a debugging function option which is used for providing a function for generating the debugging request;
the sending unit 1702 is further configured to execute sending the debugging request to the server through a fourth communication channel in response to the selection operation of the debugging function option.
In a possible implementation manner, the main panel further includes an attribute obtaining option, and the attribute obtaining option corresponds to the address information;
the first display unit is further configured to execute a selection operation responding to the attribute acquisition option and display an attribute panel of the first page, wherein the attribute panel is used for providing a function of a webpage view state, and the attribute panel comprises a container state acquisition option;
The sending unit 1702, configured to execute, in response to a selection operation of the container state obtaining option, sending a container state obtaining request to the server through a fifth communication channel, where the container state obtaining request is used to instruct to obtain state data of a web page view mounted on the first page;
the receiving unit 1701 is further configured to execute receiving, through the fifth communication channel, the status data of the web page view sent by the server.
In one possible implementation, the apparatus 1700 further includes:
a second display unit configured to perform displaying the status data of the web page view in the property panel.
In one possible implementation, the property panel is further used for providing a function of web page view performance, and the property panel further comprises a container performance acquisition option;
the sending unit 1702, configured to execute, in response to a selection operation of the container performance obtaining option, sending a container performance obtaining request to the server through the fifth communication channel, where the container performance obtaining request is used to instruct to obtain performance data of the web page view mounted on the first page;
The receiving unit 1701 is further configured to execute receiving, through the fifth communication channel, the performance data of the web page view sent by the server.
In one possible implementation, the apparatus 1700 further includes:
a third display unit configured to display the performance data of the web page view in the property panel.
In one possible implementation, the property panel is further used for providing a function of the performance of the target application, and the property panel further comprises an application performance acquisition option;
the sending unit 1702, configured to execute, in response to a selection operation of the application performance obtaining option, sending an application performance obtaining request to the server through the fifth communication channel, where the application performance obtaining request is used to instruct to obtain performance data of the target application;
the receiving unit 1701 is further configured to execute receiving, through the fifth communication channel, the performance data of the target application sent by the server.
In one possible implementation, the apparatus 1700 further includes:
a fourth display unit configured to execute displaying the performance data of the target application in the property panel.
In one possible embodiment, the property panel further includes a real time panel, and the real time panel is used to show a real time corresponding to the property data of the page, and the apparatus 1700 further includes:
and the fifth display unit is configured to display the real time corresponding to the attribute data of the first page in a real time panel.
In one possible embodiment, the property panel further comprises an offline package panel, the offline package panel is used for providing offline page code of the first page, the offline package panel comprises a running option, and the running option is used for providing a function of running the offline page code; the apparatus 1700 further comprises:
a running unit configured to execute the offline page code of the first page in response to a selection operation of the running option in the offline package panel.
In one possible implementation, the apparatus 1700 further includes:
a sixth display unit configured to display a debugging result of the first page in the debugging panel.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
FIG. 18 is a block diagram of an electronic device shown in accordance with an example embodiment. The electronic device 1800 shown in fig. 18 is configured as a first terminal or a second terminal, the electronic device 1800 may be a portable mobile terminal, such as: a smart phone, a tablet computer, a player, a laptop computer or a desktop computer. The electronic device 1800 may also be referred to by other names such as user equipment, portable terminals, laptop terminals, desktop terminals, etc.
Generally, the electronic device 1800 includes: a processor 1801 and a memory 1802. In some embodiments, the processor 1801 may be integrated with a GPU, which is responsible for rendering and drawing the content that the display screen needs to display. The memory 1802 may include one or more computer-readable storage media for storing at least one instruction for execution by the processor 1801 to implement the page debugging method provided by the method embodiments of the present application.
In some embodiments, the electronic device 1800 may also optionally include: a peripheral interface 1803 and at least one peripheral. The processor 1801, memory 1802, and peripheral interface 1803 may be connected by a bus or signal line. Each peripheral device may be connected to the peripheral device interface 1803 by a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 1804, a display 1805 and a power supply 1806.
The peripheral interface 1803 may be used to connect Input/Output (I/O) related at least one peripheral to the processor 1801 and the memory 1802. The Radio Frequency circuit 1804 is used to receive and transmit Radio Frequency (RF) signals, also referred to as electromagnetic signals. The radio frequency circuitry 1804 communicates with communication networks and other communication devices via electromagnetic signals. The display 1805 is used to display a User Interface (UI). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 1805 is a touch display screen, the display screen 1805 also has the ability to capture touch signals on or over the surface of the display screen 1805. The touch signal may be input to the processor 1801 as a control signal for processing. At this point, the display 1805 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. The power supply 1806 is used to power various components within the electronic device 1800.
In some embodiments, the electronic device 1800 also includes one or more sensors 1810. The one or more sensors 1810 include, but are not limited to: acceleration sensor 1811, gyro sensor 1812, and pressure sensor 1813.
The acceleration sensor 1811 may detect the magnitude of acceleration on three coordinate axes of a coordinate system established with the electronic device 1800. The processor 1801 may control the display 1805 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 1811.
The gyro sensor 1812 may detect a body direction and a rotation angle of the electronic device 1800, and the gyro sensor 1812 may cooperate with the acceleration sensor 1811 to collect a 3D motion of the user on the electronic device 1800. The processor 1801 may implement the following functions according to the data collected by the gyro sensor 1812: motion sensing (such as changing the UI according to a tilt operation by the user) and inertial navigation.
The pressure sensors 1813 may be disposed on a side bezel of the electronic device 1800 and/or on a lower layer of the display 1805. When the pressure sensor 1812 is disposed on a side frame of the electronic device 1800, a user's holding signal of the electronic device 1800 can be detected, and the processor 1801 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 1813. When the pressure sensor 1813 is disposed at the lower layer of the display screen 1805, the processor 1801 controls the operability control on the UI interface according to the pressure operation of the user on the display screen 1805.
Those skilled in the art will appreciate that the configuration shown in fig. 18 does not constitute a limitation of the electronic device 1800 and may include more or fewer components than those shown, or combine certain components, or employ a different arrangement of components.
Fig. 19 is a block diagram of an electronic device provided in an embodiment of the present application, and referring to fig. 19, the electronic device 1900 is configured as a server, and the electronic device 1900 may have a relatively large difference due to different configurations or performances, and may include one or more processors 1901 and one or more memories 1902, where the memory 1902 stores at least one program code, and the at least one program code is loaded and executed by the processors 1901 to implement the methods provided in the following method embodiments. Of course, the electronic device 1900 may further have a wired or wireless network interface, a keyboard, an input/output interface, and other components to facilitate input and output, and the electronic device 1900 may further include other components for implementing device functions, which is not described herein again.
In an exemplary embodiment, a storage medium comprising instructions, such as the memory 804 comprising instructions, executable by a processor within a computer device to perform the above-described method is also provided. Alternatively, the storage medium may be a non-transitory computer readable storage medium, which may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like. The computer device is the first terminal, the second terminal or the server.
In an exemplary embodiment, a computer program product is also provided, which includes program code stored in a computer-readable storage medium, which is read by a processor of a computer device from the computer-readable storage medium, and which is executed by the processor to cause the computer device to execute the above-mentioned method. The computer device is the first terminal, the second terminal or the server.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A page debugging method is applied to a first terminal, and comprises the following steps:
responding to debugging prompt operation of a first page in a target application, and sending a debugging prompt message to a second terminal through a server, wherein the debugging prompt message is used for prompting that the first page in the target application supports debugging;
receiving a debugging request of the second terminal from the server, wherein the debugging request is used for indicating that the first page is debugged;
acquiring a debugging result of the first page based on the debugging request;
and sending the debugging result of the first page to the second terminal through the server.
2. The page debugging method according to claim 1, wherein the webpage view mounted on the first page corresponds to a first communication channel, and the first communication channel is a communication channel between an operating system of the first terminal and a webpage view kernel;
the obtaining of the debugging result of the first page based on the debugging request comprises:
sending the debugging request to the webpage view kernel through the first communication channel corresponding to the webpage view, and debugging the first page by the webpage view kernel based on the debugging request to obtain a debugging result of the first page;
And receiving a debugging result of the first page sent by the debugging front end through the first communication channel corresponding to the webpage view.
3. A page debugging method is applied to a server, and comprises the following steps:
receiving a debugging prompt message from the first terminal, wherein the debugging prompt message is used for prompting that a first page in a target application of the first terminal supports debugging;
sending the debugging prompt message to a second terminal through a third communication channel, wherein the third communication channel corresponds to a main panel of the second terminal, and the main panel is used for providing a function of processing the debugging prompt message;
receiving a debugging request of the second terminal through a fourth communication channel, wherein the debugging request is used for indicating to debug the first page, the fourth communication channel corresponds to a debugging panel of the second terminal, and the debugging panel is used for providing a page debugging function;
sending a debugging request of the second terminal to the first terminal;
receiving a debugging result of the first page from the first terminal;
and sending the debugging result of the first page to the second terminal through the fourth communication channel.
4. A page debugging method is applied to a second terminal, and comprises the following steps:
receiving a debugging prompt message of a first terminal sent by a server through a third communication channel, wherein the debugging prompt message is used for prompting that a first page in a target application of the first terminal supports debugging, the third communication channel corresponds to a main panel of a second terminal, and the main panel is used for providing a function of processing the debugging prompt message;
responding to debugging operation of the first page, and sending a debugging request to the server through a fourth communication channel, wherein the debugging request is used for indicating debugging of the first page, the fourth communication channel corresponds to a debugging panel of the second terminal, and the debugging panel is used for providing a page debugging function;
and receiving the debugging result of the first page sent by the server through the fourth communication channel.
5. A page debugging device is applied to a first terminal, and comprises:
the first sending unit is configured to execute a debugging prompt operation responding to a first page in a target application, and send a debugging prompt message to a second terminal through a server, wherein the debugging prompt message is used for prompting that the first page in the target application supports debugging;
A receiving unit configured to execute receiving, from the server, a debugging request of the second terminal, the debugging request being used for instructing debugging of the first page;
an obtaining unit configured to perform obtaining a debugging result of the first page based on the debugging request;
and the second sending unit is configured to send the debugging result of the first page to the second terminal through the server.
6. A page debugging device is applied to a server, and comprises:
a receiving unit configured to perform receiving a debugging prompting message from the first terminal, wherein the debugging prompting message is used for prompting that a first page in a target application of the first terminal supports debugging;
a sending unit configured to execute sending the debugging prompt message to a second terminal through a third communication channel, where the third communication channel corresponds to a main panel of the second terminal, and the main panel is used for providing a function of processing the debugging prompt message;
the receiving unit is further configured to execute receiving, through a fourth communication channel, a debugging request of the second terminal, where the debugging request is used to instruct to debug the first page, the fourth communication channel corresponds to a debugging panel of the second terminal, and the debugging panel is used to provide a function of page debugging;
The sending unit is further configured to execute sending a debugging request of the second terminal to the first terminal;
the receiving unit is further configured to receive the debugging result of the first page from the first terminal;
the sending unit is further configured to send the debugging result of the first page to the second terminal through the fourth communication channel.
7. A page debugging device is applied to a second terminal, and comprises:
the debugging device comprises a receiving unit, a debugging prompting unit and a processing unit, wherein the receiving unit is configured to execute a third communication channel and receive a debugging prompting message of a first terminal sent by a server, the debugging prompting message is used for prompting that a first page in a target application of the first terminal supports debugging, the third communication channel corresponds to a main panel of a second terminal, and the main panel is used for providing a function of processing the debugging prompting message;
a sending unit, configured to execute a debugging operation on the first page, and send a debugging request to the server through a fourth communication channel, where the debugging request is used to instruct to debug the first page, the fourth communication channel corresponds to a debugging panel of the second terminal, and the debugging panel is used to provide a function of page debugging;
The receiving unit is further configured to execute receiving, through the fourth communication channel, a debugging result of the first page sent by the server.
8. An electronic device, comprising:
one or more processors;
one or more memories for storing the one or more processor-executable instructions;
wherein the one or more processors are configured to execute the instructions to implement the page debugging method of any of claims 1-4.
9. A computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the page debugging method of any of claims 1-4.
10. A computer program product, one or more instructions in the computer program product, which when executed by one or more processors of an electronic device, enable the electronic device to perform the page debugging method of any one of claims 1-4.
CN202210082439.8A 2022-01-24 2022-01-24 Page debugging method and device, electronic equipment and computer readable storage medium Pending CN114490378A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210082439.8A CN114490378A (en) 2022-01-24 2022-01-24 Page debugging method and device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210082439.8A CN114490378A (en) 2022-01-24 2022-01-24 Page debugging method and device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN114490378A true CN114490378A (en) 2022-05-13

Family

ID=81474073

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210082439.8A Pending CN114490378A (en) 2022-01-24 2022-01-24 Page debugging method and device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114490378A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170185508A1 (en) * 2015-12-28 2017-06-29 Juniper Networks, Inc. Systems and methods for unit testing of functions on remote kernels
CN107102950A (en) * 2017-07-04 2017-08-29 天津云聚科技有限公司 A kind of applied program testing method and device
CN107783899A (en) * 2017-08-25 2018-03-09 上海壹账通金融科技有限公司 The method of testing of the H5 pages, device and computer equipment in application program
CN109002366A (en) * 2018-07-26 2018-12-14 广东蔚海数问大数据科技有限公司 A kind of remote debugging method and device of mobile terminal webpage
CN109032705A (en) * 2018-07-05 2018-12-18 腾讯科技(深圳)有限公司 Execution method, apparatus, electronic equipment and the readable storage medium storing program for executing of application program
CN109660399A (en) * 2018-12-24 2019-04-19 苏州思必驰信息科技有限公司 A kind of method and system of remote debugging

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170185508A1 (en) * 2015-12-28 2017-06-29 Juniper Networks, Inc. Systems and methods for unit testing of functions on remote kernels
CN107102950A (en) * 2017-07-04 2017-08-29 天津云聚科技有限公司 A kind of applied program testing method and device
CN107783899A (en) * 2017-08-25 2018-03-09 上海壹账通金融科技有限公司 The method of testing of the H5 pages, device and computer equipment in application program
CN109032705A (en) * 2018-07-05 2018-12-18 腾讯科技(深圳)有限公司 Execution method, apparatus, electronic equipment and the readable storage medium storing program for executing of application program
CN109002366A (en) * 2018-07-26 2018-12-14 广东蔚海数问大数据科技有限公司 A kind of remote debugging method and device of mobile terminal webpage
CN109660399A (en) * 2018-12-24 2019-04-19 苏州思必驰信息科技有限公司 A kind of method and system of remote debugging

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
赵俊涛 等: ""嵌入式内核远程调试系统的研究与应用"", 《计算机应用与软件》, 15 August 2015 (2015-08-15), pages 211 - 214 *

Similar Documents

Publication Publication Date Title
CN111684778B (en) Implementation method of application function and electronic equipment
CN107040609B (en) Network request processing method and device
CN109165050B (en) Program running method and device, computing equipment and storage medium
WO2018077041A1 (en) Method and apparatus for running application
CN110837473B (en) Application program debugging method, device, terminal and storage medium
US10637804B2 (en) User terminal apparatus, communication system, and method of controlling user terminal apparatus which support a messenger service with additional functionality
CN111416756B (en) Protocol testing method, device, computer equipment and storage medium
CN102752369B (en) The supplying method of TV applications service and virtual content service platform
CN110275836B (en) Security test method, device and storage medium for illusion engine application
CN103777967A (en) Page returning method and page generating method and device
CN107666406B (en) Intelligent card display method and device
CN112420217B (en) Message pushing method, device, equipment and storage medium
CN107862091B (en) Control method and device for realizing webpage access
CN113613064B (en) Video processing method, device, storage medium and terminal
US20180027355A1 (en) Data download method and apparatus
CN108052377B (en) Cloud-based input processing method and device, server and storage medium
CN114237840A (en) Resource interaction method, device, terminal and storage medium
CN112148499A (en) Data reporting method and device, computer equipment and medium
CN111708533B (en) Method and device for setting mouse display state in application thin client
CN112052419A (en) Picture loading method, device and equipment and readable storage medium
CN111131358B (en) Information acquisition method, device and system, readable storage medium and electronic equipment
CN105094872A (en) Method and apparatus for displaying webpage application
CN112764746A (en) Data processing method and device, electronic equipment and storage medium
CN114490378A (en) Page debugging method and device, electronic equipment and computer readable storage medium
CN111338961B (en) Application debugging method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination