CN113760688A - Remote debugging method, system, webpage server, equipment and storage medium - Google Patents

Remote debugging method, system, webpage server, equipment and storage medium Download PDF

Info

Publication number
CN113760688A
CN113760688A CN202010505565.0A CN202010505565A CN113760688A CN 113760688 A CN113760688 A CN 113760688A CN 202010505565 A CN202010505565 A CN 202010505565A CN 113760688 A CN113760688 A CN 113760688A
Authority
CN
China
Prior art keywords
debugging
webpage
server
reverse proxy
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
CN202010505565.0A
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010505565.0A priority Critical patent/CN113760688A/en
Publication of CN113760688A publication Critical patent/CN113760688A/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
    • G06F11/3636Software debugging by tracing the execution of the program

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application discloses a remote debugging method, a remote debugging system, a webpage server, equipment and a storage medium, wherein the method comprises the following steps: the method comprises the steps that a webpage server receives a remote debugging instruction triggered by a user, generates a remote debugging request according to the remote debugging instruction, sends the remote debugging request to a reverse proxy server, and the reverse proxy server establishes a data path between the webpage server and the reverse proxy server according to the remote debugging request; after a webpage server receives a webpage access request sent by a webpage browser through a reverse proxy server, the webpage server obtains a target webpage according to the webpage access request, the target webpage is sent to the webpage browser through the reverse proxy server to be displayed, after the webpage browser obtains a debugging request triggered in the target webpage, the webpage browser sends the debugging request to the webpage server through the reverse proxy server, and the webpage server executes a debugging action corresponding to the debugging request on an application program to be debugged on a debugged terminal according to the debugging request.

Description

Remote debugging method, system, webpage server, equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a remote debugging method, system, web server, device, and storage medium.
Background
Remote debugging refers to that a technician debugs a debugged end in a second network by using a debugging end in a first network. Because the first network is different from the second network (for example, the first network is a first enterprise local area network, and the second network is a second enterprise local area network), the debug terminal in the first network cannot directly access the debugged terminal in the second network, so that the debug terminal cannot remotely debug the debugged terminal. For ease of understanding, the following description is made with reference to examples.
For example, when an Application (APP) on a mobile terminal runs abnormally (for example, an abnormal condition such as flash back) during use, a technician needs to remotely debug the APP on the terminal device by using a debugging terminal in an enterprise lan of an enterprise where the technician is located, so that the debugged APP can run normally. The network where the terminal device is located may be a network of a mobile operator or an enterprise local area network of an enterprise where a user of the terminal device is located, so that the network where the debugging end is located is different from the network where the terminal device is located, which results in that the debugging end cannot access the terminal device, and thus how to implement remote debugging of the debugged end becomes an urgent technical problem to be solved.
Disclosure of Invention
The embodiment of the application provides a remote debugging method, a remote debugging system, a webpage server, equipment and a storage medium, and can realize remote debugging of a debugged end by a debugging end.
In view of this, a first aspect of the present application provides a remote debugging method, which is applied to a debuggee end, where a web server is installed on the debuggee end, and the method includes:
when the webpage server receives a remote debugging instruction triggered by a user, the webpage server generates a remote debugging request according to the remote debugging instruction;
the webpage server sends the remote debugging request to a reverse proxy server so that the reverse proxy server establishes a data path between the webpage server and the reverse proxy server according to the remote debugging request; the data path is used for transmitting communication data between the webpage server and the reverse proxy server;
after the webpage server receives a webpage access request sent by the reverse proxy server, the webpage server acquires a target webpage according to the webpage access request; wherein the web page access request is received by the reverse proxy server from a web browser installed on a debugging end;
the webpage server sends the target webpage to the reverse proxy server so that the reverse proxy server sends the target webpage to the webpage browser for display;
after the webpage server receives a debugging request sent by the reverse proxy server, the webpage server executes a debugging action corresponding to the debugging request on an application program to be debugged on the debugged end according to the debugging request; wherein the debugging request is received by the reverse proxy server from the web browser.
A second aspect of the present application provides a remote debugging system, where the remote debugging system includes a web server, a reverse proxy server, and a web browser, where the web server is installed at a debugged end, the web browser is installed at the debugging end, and the debugged end and the debugging end communicate with each other through the reverse proxy server;
the webpage server is used for generating a remote debugging request according to a remote debugging instruction triggered by a user when receiving the remote debugging instruction, and sending the remote debugging request to the reverse proxy server;
the reverse proxy server is used for establishing a data path between the webpage server and the reverse proxy server according to the remote debugging request; receiving a webpage access request sent by the webpage browser, and sending the webpage access request to the webpage server; the data path is used for transmitting communication data between the webpage server and the reverse proxy server;
the webpage server is further used for acquiring a target webpage according to the webpage access request after receiving the webpage access request sent by the reverse proxy server, and sending the target webpage to the reverse proxy server;
the webpage browser is used for displaying a target webpage after receiving the target webpage sent by the reverse proxy server; acquiring a debugging request triggered in the target webpage, and sending the debugging request to the reverse proxy server;
and the webpage server is further used for executing a debugging action corresponding to the debugging request on the application program to be debugged on the debugged terminal according to the debugging request after receiving the debugging request sent by the reverse proxy server.
A third aspect of the present application provides a remote debugging apparatus, including:
the device comprises a generating unit, a processing unit and a processing unit, wherein the generating unit is used for generating a remote debugging request according to a remote debugging instruction triggered by a user when the remote debugging instruction is received;
a first sending unit, configured to send the remote debugging request to a reverse proxy server, so that the reverse proxy server establishes a data path between the web server and the reverse proxy server according to the remote debugging request; the data path is used for transmitting communication data between the webpage server and the reverse proxy server;
the acquisition unit is used for acquiring a target webpage according to the webpage access request after receiving the webpage access request sent by the reverse proxy server; wherein the web page access request is received by the reverse proxy server from a web browser installed on a debugging end;
a second sending unit, configured to send the target webpage to the reverse proxy server, so that the reverse proxy server sends the target webpage to the web browser for display;
the debugging unit is used for executing a debugging action corresponding to the debugging request on the application program to be debugged on the debugged end according to the debugging request after receiving the debugging request sent by the reverse proxy server; wherein the debugging request is received by the reverse proxy server from the web browser.
A fourth aspect of the present application provides an apparatus comprising a processor and a memory:
the memory is used for storing a computer program;
the processor is configured to execute the remote debugging method according to the first aspect.
A fifth aspect of the present application provides a computer-readable storage medium for storing a computer program for executing the remote debugging method of the first aspect.
A sixth aspect of the present application provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the remote debugging method of the first aspect described above.
According to the technical scheme, the embodiment of the application has the following advantages:
the remote debugging method based on the webpage is applied to a remote debugging system, the remote debugging system comprises a webpage server, a reverse proxy server and a webpage browser, the webpage server is installed at a debugged end, the webpage browser is installed at a debugging end, and the debugged end and the debugging end communicate through the reverse proxy server; moreover, the remote debugging method specifically comprises the following steps: when receiving a remote debugging instruction triggered by a user, a webpage server generates a remote debugging request according to the remote debugging instruction, and then sends the remote debugging request to a reverse proxy server, so that the reverse proxy server establishes a data path between the webpage server and the reverse proxy server according to the remote debugging request; after the reverse proxy server receives a webpage access request sent by a webpage browser, the webpage access request is forwarded to the webpage server, so that the webpage server firstly obtains a target webpage according to the webpage access request and then sends the target webpage to the reverse proxy server. After receiving the target webpage forwarded by the reverse proxy server, the webpage browser displays the target webpage, acquires a debugging request triggered in the target webpage, and sends the debugging request to the reverse proxy server, so that the webpage server executes a debugging action corresponding to the debugging request on an application program to be debugged on a debugged terminal according to the debugging request after receiving the debugging request forwarded by the reverse proxy server.
The debugging end is internally provided with the webpage server, and the debugging end is internally provided with the webpage browser, so that the debugging end and the debugged end can communicate through the reverse proxy server, technicians can access and debug the intranet page server in the debugged end by using the webpage browser in the debugging end, and the debugging end can be debugged remotely.
Drawings
Fig. 1 is a schematic structural diagram of a remote debugging system according to an embodiment of the present application;
fig. 2 is a schematic workflow diagram of a remote debugging system according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a remote debugging method according to an embodiment of the present application;
FIG. 4 is an illustration of an exemplary web server according to an embodiment of the present disclosure;
FIG. 5 is a diagram illustrating an example of a target web page provided by an embodiment of the present application;
fig. 6 is a flowchart of a remote debugging method applied to the remote debugging system shown in fig. 1 and fig. 2 according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a remote debugging apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of another remote debugging apparatus provided in the embodiment of the present application;
fig. 9 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, 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 application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the related art, the debugging end may be first connected to the debugged end by a wire, and then the debugging end debugs the debugged end according to an operating system used by the debugged end, where the specific process is as follows: the debugging end firstly determines an operating system used by the debugged end as a target operating system, and then determines a debugging process corresponding to the target operating system according to the target operating system, so that the debugging end debugs the debugged end by using the debugging process corresponding to the target operating system.
It can be seen that the above debugging process has the following disadvantages: the debugging end needs to determine the debugging process used when debugging the debugged end according to the operating system used by the debugged end, so that the debugging process is relatively complex; moreover, the debugging end usually only includes debugging processes corresponding to some common operating systems (i.e., operating systems with a large number of users, such as windows systems and IOS systems), so that the debugging end can only debug the debugged end using the common operating systems, and the debugging end cannot debug the rare operating systems (i.e., operating systems with a small number of users).
In view of the technical problems in the related art in the debugging process, embodiments of the present application provide a remote debugging method, which can simplify the debugging process on the basis of implementing remote debugging of a debuggee by a debugging end, and make the debugging end suitable for debugging the debuggee using various operating systems.
Specifically, in the remote debugging method provided in the embodiment of the present application, when receiving a remote debugging instruction triggered by a user, a web server installed in a debugged end first generates a remote debugging request according to the remote debugging instruction, and then sends the remote debugging request to a reverse proxy server, so that the reverse proxy server establishes a data path between the web server and the reverse proxy server according to the remote debugging request; after the reverse proxy server receives a webpage access request sent by a webpage browser installed in the debugging end, the webpage access request is forwarded to the webpage server, so that the webpage server firstly obtains a target webpage according to the webpage access request and then sends the target webpage to the reverse proxy server. After receiving the target webpage forwarded by the reverse proxy server, the webpage browser displays the target webpage, acquires a debugging request triggered in the target webpage, and sends the debugging request to the reverse proxy server, so that the webpage server executes a debugging action corresponding to the debugging request on an application program to be debugged on a debugged terminal according to the debugging request after receiving the debugging request forwarded by the reverse proxy server.
Therefore, the webpage server is installed in the debugged terminal, and the webpage browser is installed in the debugging terminal, so that the debugging terminal and the debugged terminal can communicate through the reverse proxy server, technicians can access and debug the intranet page server in the debugged terminal by using the webpage browser in the debugging terminal, and the debugging terminal can be remotely debugged. The debugging end is used for remotely debugging the debugged end based on the webpage, so that the debugging end can debug the debugged end using various operating systems, the adverse effect caused by the diversification of the operating systems of the debugged end can be effectively overcome, the debugging end is not influenced by the operating system used by the debugged end when debugging the debugged end, and the debugging effect is favorably improved.
In order to facilitate understanding of the technical solutions provided by the embodiments of the present application, a remote debugging system is described below with reference to fig. 1 and fig. 2. Fig. 1 is a schematic structural diagram of a remote debugging system provided in an embodiment of the present application; fig. 2 is a schematic workflow diagram of a remote debugging system according to an embodiment of the present application.
As shown in fig. 1, the remote debugging system provided by the embodiment of the present application includes a web server 101, a reverse proxy server 102, and a web browser 103; furthermore, the web server 101 is installed at the debuggee, the web browser 103 is installed at the debug, and the debuggee and the debug communicate through the reverse proxy server 102.
The webpage server 101 is used for generating a remote debugging request according to a remote debugging instruction when receiving the remote debugging instruction triggered by a user, and sending the remote debugging request to the reverse proxy server 102;
the reverse proxy server 102 is used for establishing a data path between the web server 101 and the reverse proxy server 102 according to the remote debugging request; receiving a web page access request sent by a web browser 103, and sending the web page access request to a web server 101;
the web server 101 is further configured to, after receiving the web access request sent by the reverse proxy server 102, obtain a target web page according to the web access request, and send the target web page to the reverse proxy server 102;
the web browser 103 is configured to display a target web page after receiving the target web page sent by the reverse proxy server 102; acquiring a debugging request triggered in a target webpage and sending the debugging request to the reverse proxy server 102;
the web server 101 is further configured to, after receiving the debugging request sent by the reverse proxy server 102, execute a debugging action corresponding to the debugging request on the application program to be debugged on the debugged end according to the debugging request.
Based on the remote debugging system and fig. 2, the remote debugging process based on the remote debugging system specifically includes: firstly, when a webpage server 101 pre-installed at a debugged end receives a remote debugging instruction triggered by a user, the webpage server 101 generates a remote debugging request according to the remote debugging instruction, and sends the remote debugging request to a reverse proxy server 102, so that the reverse proxy server 102 establishes a data path between the webpage server 101 and the reverse proxy server 102 according to the remote debugging request. Then, when the web browser 103 installed in the debugging end in advance sends a web access request to the reverse proxy server 102, the reverse proxy server 102 forwards the web access request to the web server 101, so that the web server 101 obtains a target web page according to the web access request, and sends the target web page to the reverse proxy server 102, so that the reverse proxy server 102 forwards the target web page to the web browser 103 for display. Finally, after the web browser 103 obtains a debugging request triggered by a technician from a target web page, the web browser 103 sends the debugging request to the reverse proxy server 102, so that the reverse proxy server 102 forwards the debugging request to the web server 101, so that the web server 101 can execute a debugging action corresponding to the debugging request on the application to be debugged on the debugged terminal according to the debugging request. Therefore, the remote debugging system provided by the embodiment of the application can realize remote debugging of the debugged end by the debugging end by means of the access and operation process of the webpage.
It should be understood that, in the remote debugging system provided in the embodiment of the present application, the debugged end may specifically be a terminal device such as a smart phone, a computer, a Personal Digital Assistant (PDA), a tablet computer, or the like; the debugging end can be terminal equipment such as a smart phone, a computer, a Personal Digital Assistant (PDA), a tablet computer and the like; the reverse proxy server may be any server capable of providing a reverse proxy function, for example, the reverse proxy server may specifically be an application server, and may also be a Web server, and in actual deployment, the server may be an independent server, and may also be a cluster server or a cloud server.
The following describes a remote debugging method applied to a remote debugging system according to an embodiment.
Method embodiment
Referring to fig. 3, fig. 3 is a schematic flowchart of a remote debugging method according to an embodiment of the present application. As shown in fig. 3, the remote debugging method includes S301 to S305:
s301: and when the webpage server receives a remote debugging instruction triggered by a user, the webpage server generates a remote debugging request according to the remote debugging instruction.
The webpage server is used for processing a webpage access request and a webpage processing request sent by a webpage browser installed on the debugging end so as to realize that the debugging end remotely debugs the application program to be debugged on the debugged end.
The webpage server is pre-installed at the debugged end; in addition, the installation time of the web server is not limited in the embodiment of the present application, for example, the installation time of the web server may be a time when the user downloads and installs the application program to be debugged on the debugged terminal.
In some cases, in order to ensure information security of the user, after the web server is downloaded to the debugged terminal, the enabling state of the web server may be initialized to be set to be prohibited from accessing, and only when the user needs to perform remote debugging on the application program to be debugged by means of the web server, the debugged terminal may change the enabling state of the web server to be allowed to access according to a request for starting the web server triggered by the user.
In addition, the triggering manner of the request to open the web server is not limited in the embodiment of the present application, for example, as shown in fig. 4, the request to open the web server may be triggered by a user selecting a manner of opening remote debugging in an application to be debugged on a debugged terminal. Based on this, the embodiment of the present application further provides an implementation manner of the remote debugging method, in this implementation manner, the initialization of the enabled state of the web server is set to disable access, and the remote debugging method further includes, before performing S301, S306:
s306: when a user selects to start remote debugging in an application program to be debugged on a debugged end, the debugged end sets the enabling state of the web server to be allowed to access so that the web server receives a remote debugging instruction triggered by the user.
In the embodiment of the application, after the web server is downloaded to the debugged terminal, the enabling state of the web server can be initialized to be set to be prohibited from being accessed, so that the web server cannot send any data on the debugged terminal to the outside in other time periods except for the remote debugging period, and the information security of a user can be guaranteed. In addition, only when a user wishes to perform remote debugging on the application program to be debugged on the debugged end by the debugging end, the user can select to start remote debugging in the application program to be debugged on the debugged end, so that the debugged end can set the enabling state of the web server to be allowed to access, the web server can receive a remote debugging instruction triggered by the user, and the web server can participate in the remote debugging process of the debugging end on the debugged end in a manner of receiving a web page related request sent by an external network.
The remote debugging instruction is an instruction triggered by a user and used for requesting remote debugging on the application program to be debugged on the debugged end. The embodiment of the present application does not limit the triggering manner of the remote debugging instruction, for example, the remote debugging instruction may be triggered by a user by clicking a remote debugging button in the application to be debugged on the debugged end. It should be noted that, in some cases, the remote debugging instruction may also be triggered by the way that the user selects to start remote debugging in the application to be debugged on the debugged end.
The remote debugging request is a request generated by a web server and used for applying for establishing a data path between a debugged end and the reverse proxy server from the reverse proxy server. In addition, the embodiment of the present application does not limit the generation process of the remote debugging request, and the following description is made in conjunction with a possible implementation manner.
In a possible implementation manner, the generation process of the remote debugging request may specifically be: the webpage server sends the remote debugging instruction to a background server of the application program to be debugged, so that the background server of the application program to be debugged generates a debugging authorization code according to the remote debugging instruction; the webpage server receives a debugging authorization code sent by a background server of the application program to be debugged, and generates a remote debugging request according to the debugging authorization code.
The debugging authorization code carries the identification of the debugged end, the time of the debugged end for applying remote debugging, the identification of the application program to be debugged and the like. It should be noted that, in this embodiment of the present application, the identifier of the debuggee is not limited, for example, the identifier of the debuggee may be a hardware address of a network card in the debuggee.
Based on the above content, in the embodiment of the application, after the web server receives the remote debugging instruction, the web server may first send the remote debugging instruction to the background server of the application program to be debugged, so that the background server can generate the debugging authorization code based on the debugging application program, and feed back the debugging authorization code to the web server. The webpage server can generate a remote debugging request by using the debugging authorization code, so that the remote debugging request carries the debugging authorization code, and the subsequent reverse proxy server can verify the identity of the debugged terminal and the debugging terminal by using the debugging authorization code carried by the remote debugging request. Therefore, the safety and the credibility of the remote debugging process are improved.
Based on the above-mentioned related content of S301, in the remote debugging system, when a user desires a technician to remotely debug an application program to be debugged on a debugged end used by the user through a debugging end, the user may first select a way of starting remote debugging from the application program to be debugged on the debugged end by the user to change an enabling state of a web server in the debugged end to be allowed to access, so that the web server can receive a remote debugging instruction and can receive a web access or operation request sent by an external network, and further, the web server can generate a remote debugging request carrying an authorization code according to the remote debugging instruction, so that a subsequent reverse proxy server can establish a data path between the reverse proxy server and the web server based on the remote debugging request (that is, the data path between the reverse proxy server and the debuggee).
S302: the webpage server sends the remote debugging request to the reverse proxy server so that the reverse proxy server establishes a data path between the webpage server and the reverse proxy server according to the remote debugging request.
The data path is used for transmitting communication data between the web server and the reverse proxy server. That is, the data path between the web server and the reverse proxy server is dedicated to data communication between the web server and the reverse proxy server. It should be noted that, the embodiment of the present application does not limit the establishment process of the data path.
In some cases, in order to ensure the information security of the debuggee, the reverse proxy server needs to authenticate the debuggee before establishing a data path between the web server and the reverse proxy server. Based on this, an embodiment of the present application provides an implementation manner for establishing the data path by the reverse proxy server, which specifically includes: if the remote debugging request carries the debugging authorization code, the reverse proxy server establishes a data path between the webpage server and the reverse proxy server when the debugging authorization code carried in the remote debugging request is confirmed to pass verification.
In the embodiment of the application, after the reverse proxy server receives the debugging authorization code sent by the web server, the reverse proxy server verifies the debugging authorization code carried in the remote debugging request, so that when the debugging authorization code carried in the remote debugging request is determined to pass the verification, a data path between the web server and the reverse proxy server is established. The specific process of verifying the debugging authorization code by the reverse proxy server may be: the reverse proxy server sends the debugging authorization code to the background server of the application program to be debugged, so that the background server of the application program to be debugged firstly matches the debugging authorization code received from the reverse proxy server with the debugging authorization code stored in the background server of the application program to be debugged to obtain a matching result, and then feeds the matching result back to the reverse proxy server, so that the reverse proxy server determines a verification result according to the matching result, specifically comprising: if the matching result is that the matching is successful, the reverse proxy server determines that the debugging authorization code sent by the debugged end passes the verification; otherwise, the reverse proxy server determines that the debugging authorization code sent by the debuggee end is not verified.
In addition, in some cases, in order to enable the reverse proxy server to quickly determine the data path corresponding to the debugged end in the subsequent remote debugging process, after the reverse proxy server establishes the data path between the web page server and the reverse proxy server, the reverse proxy server may first determine the path identifier of the data path between the web page server and the reverse proxy server as the first identifier, and then add the correspondence between the first identifier and the identifier of the debugged end to the first mapping relationship, so that the correspondence between the first identifier and the identifier of the debugged end is recorded in the first mapping relationship. The first mapping relation is used for recording the corresponding relation between the data path and the debugged terminal, and the first mapping relation is stored in the reverse proxy server.
Based on the above-mentioned related content of S302, in the remote debugging system, after the reverse proxy server receives the remote debugging request carrying the debugging authorization code sent by the web server, the reverse proxy server first determines whether the debugging authorization code received by the reverse proxy server passes the verification, and after the debugging authorization code received by the network element is confirmed to pass the verification, a data path between the webpage server and the reverse proxy server is established, and adds the corresponding relation between the identification of the data path and the identification of the debugged end to the first mapping relation, so that the subsequent reverse proxy server can quickly and accurately determine the data path between the webpage server and the reverse proxy server based on the identification of the debugged end in the subsequent remote debugging process, and using the data path to perform data transmission between the web server and the reverse proxy server. The data path between the web server and the reverse proxy server is specially used for data transmission between the web server and the reverse proxy server, so that the data transmission between the web server and the reverse proxy server is not influenced by other data transmission, the transmission efficiency and the transmission safety of the data transmission between the web server and the reverse proxy server can be improved, and the information safety of a user can be effectively improved. It should be noted that, after the reverse proxy server establishes the data path between the web server and the reverse proxy server, the reverse proxy server may send a message to notify the debugging end and the debugged end, so that the debugging end or the debugged end can know that the reverse proxy server is ready to execute the forwarding function between the debugging end and the debugged end.
S303: and after the webpage server receives the webpage access request sent by the reverse proxy server, the webpage server acquires the target webpage according to the webpage access request.
The web page access request is received by the reverse proxy server from a web browser installed on the debugging end. In addition, the embodiment of the present application is not limited to the implementation in which the web browser receives the web access request, and for convenience of understanding, the following description is made with reference to an example.
As an example, after the technician acquires the website of the web server on the debugged end (e.g. the website "https:// abcdefg" shown in fig. 4), the technician may first input the website of the web server into a search box of the web browser on the debugged end, and then trigger a web access request in the web browser by clicking a search button, so that the web browser receives the web access request. It should be noted that, in the embodiment of the present application, the obtaining method of the web address of the web server is not limited, and the web address may be directly provided to a technician by a user, or may be obtained from a background server of the application to be debugged by the technician.
The target web page refers to a web page indicated by a web address carried in the web page access request. For example, when the website of the web server on the debuggee (i.e., the website carried in the web access request) is the website "https:// abcdefg" shown in fig. 4, then the target web page may be the web page shown in fig. 5. In addition, the construction method of the target webpage is not limited in the embodiment of the application, for example, the target webpage can be constructed by adopting Ant Design Pro as an interface framework.
Based on the above content, in the remote debugging system, after the technician acquires the website of the web server on the debugged end, the technician may first input the website of the web server into the search box of the web browser of the debugging end, and then trigger the web access request in the web browser by clicking the search button, so that the web browser receives the web access request. The web browser sends the web access request to the reverse proxy server to enable the reverse proxy server to forward the web access request to the web server. After the web page server receives the web page access request, the web page server acquires a target web page indicated by a web address according to the web address carried in the web page access request, and sends the target web page to the reverse proxy server, so that the reverse proxy server can forward the target web page to the web page browser, and the web page browser can display the target web page (as shown in fig. 5), thereby enabling a technician to trigger the debugging request in a mode of clicking a control or inputting a control instruction on the target web page in the subsequent debugging process.
S304: the webpage server sends the target webpage to the reverse proxy server so that the reverse proxy server sends the target webpage to the webpage browser for display.
S305: after the webpage server receives the debugging request sent by the reverse proxy server, the webpage server executes the debugging action corresponding to the debugging request to the application program to be debugged on the debugged end according to the debugging request.
The debug request is received by the reverse proxy server from the web browser. In addition, the embodiment of the present application does not limit the triggering manner of the debugging request, for example, the debugging request may be triggered by a user clicking a control or inputting a control instruction on the target webpage.
The types of debug requests are various, for example, the debug requests may include data fetch requests and debug operation execution requests. The data acquisition request is used for requesting the webpage server to provide data required by debugging the application program to be debugged; the debugging operation execution request is used for requesting the webpage server to debug the application program to be debugged.
Based on this, the present application also provides two possible implementations of S305, which are described in turn below.
In a first possible implementation, S305 may specifically be: when the debugging request is a data acquisition request, after the webpage server receives the debugging request sent by the reverse proxy server, the webpage server acquires target data of the application program to be debugged in a debugged end according to the debugging request; the webpage server sends the target data to the reverse proxy server so that the reverse proxy server sends the target data to the webpage browser for display.
In the implementation of the application, when a technician desires to acquire data information related to an application program to be debugged from a debugged end, the technician may trigger a data acquisition request in a target webpage, so that after receiving the data acquisition request, a webpage browser sends the data acquisition request to a reverse proxy server, so that the reverse proxy server can forward the data acquisition request to a webpage server, so that the webpage server acquires data related to the application program to be debugged, which is in accordance with the data acquisition request, from the debugged end according to the data acquisition request, determines the data as target data, and sends the target data to the webpage browser in the debugged end through the reverse proxy server, so that the webpage browser can display the target data on the target page.
The embodiment of the present application does not limit the implementation manner of the data obtaining request, for example, the data obtaining request may be implemented by using a Get manner. In addition, the embodiments of the present application are not limited to the implementation in which the web server acquires the target data, and the following description is given with reference to examples.
As a first example, when a data acquisition request belongs to a resource acquisition class request, if a web server detects that a URL (uniform resource locator) carried by the data acquisition request has a preset suffix (e.g., ". jpeg", ". png", ". css", ". svg", ". json", ". map", and other suffix words), the web server needs to convert target data acquired from a debugged end into a general MIME data type, and send the converted target data to a reverse proxy server through a packaged system Application Programming Interface (API), so that the reverse proxy server can forward the target data to a debugging end.
As a second example, when the data obtaining request belongs to a resource obtaining type request, if the web server determines that the URL carried in the data obtaining request starts with "api/", the web server extracts local data of the application program to be debugged, which is specifically: if the webpage server determines that the URL carried by the data acquisition request comprises "/api/user/info", the webpage server needs to acquire the identity information of the user, and needs to package the acquired identity information into a json form and feed the json form back to the debugging end; if the webpage server determines that the URL carried by the data acquisition request comprises "/api/device", the webpage server needs to acquire the equipment information of the debugged end, and needs to package the acquired identity information into a json form and feed the json form back to the debugged end; if the web server determines that the URL carried by the data acquisition request includes "/api/log/list", the web server needs to acquire a data source (e.g., a database operation record, a cgi request, a response record, and other data sources) supporting query operation; if the webpage server determines that the URL carried by the data acquisition request comprises "/api/database/list", the webpage server needs to acquire all database names and needs to package the acquired identity information into json form and feed the json form back to the debugging end; if the webpage server determines that the URL carried by the data acquisition request comprises "/api/log/e", the webpage server needs to establish long connection and needs to dynamically feed back database operation records and cgi request data to a debugging end in real time; if the webpage server determines that the URL carried by the data acquisition request comprises "/api/pref/list", the webpage server needs to acquire all sp contents; if the webpage server determines that the URL carried by the data acquisition request comprises "/api/pref/delete", the webpage server needs to delete sp data; the web server needs to acquire all sp contents; if the webpage server determines that the URL carried by the data acquisition request includes "/api/pref/exit", the webpage server needs to edit sp data, and the URL including "/api/pref/exit" is usually accompanied by two parameter types, values, which are respectively used for indicating an sp item to be modified and a corresponding value; if the webpage server determines that the URL carried by the data acquisition request comprises "/api/file/a", the webpage server needs to acquire files under all root directories; if the web server determines that the URL carried by the data acquisition request includes "/api/file/ls", the web server needs to acquire files in all designated directories. It should be noted that sp refers to a lightweight storage class on the Android platform, which is used to store some common configurations of applications. cgi is called Common Gateway Interface in English, and is a standard Interface for interaction between external extended application programs and web servers, which is a Common way for web servers to interact with web browsers.
Based on the above S305, in a first possible implementation manner, when the web server determines that the debugging request is a data obtaining request, the web server obtains target data of the application to be debugged in the debugged end according to the debugging request; the webpage server sends the target data to the reverse proxy server so that the reverse proxy server sends the target data to the webpage browser for display. Therefore, a technician can check the data information related to the application program to be debugged on the debugged end on the target webpage of the webpage browser.
In a second possible implementation, S305 may specifically be: when the debugging request is a debugging operation execution request, after the webpage server receives the debugging request sent by the reverse proxy server, the webpage server debugs the application program to be debugged on the debugged end according to the debugging operation information carried by the debugging request.
In the implementation of the application, when a technician wants to debug an application program to be debugged on a debugged end through a debugging end, the technician may trigger a debugging operation execution request in a target webpage, so that after receiving the debugging operation execution request, a webpage browser sends the debugging operation execution request to a reverse proxy server, and the reverse proxy server can forward the debugging operation execution request to a webpage server, so that the webpage server debugs the application program to be debugged on the debugged end according to the debugging operation execution request.
The embodiment of the present application does not limit the implementation manner of the debugging operation execution request, for example, the debugging operation execution request may be implemented in a Post manner. In addition, the embodiment of the present application does not limit the implementation manner in which the web server debugs the application to be debugged. For example, if the web server determines that the URL carried by the data acquisition request includes "/api/auth/login", the web server needs to simulate the identity to log in the enterprise, so as to conveniently reproduce the problem fed back by the user; if the web server determines that the URL carried by the data acquisition request includes "/api/database/exec", the web server needs to execute a Structured Query Language database (sql) statement to flexibly Query the data in the database; if the webpage server determines that the URL carried by the data acquisition request comprises "/api/cgi/hook" or "/api/cgi/exec", the webpage server needs protocol interception and debugging, arbitrarily constructs a request or response, and intercepts a modification request or response data in real time.
Based on the related contents of S301 to S305, in the remote debugging method based on the web page provided in the embodiment of the present application, when the web server receives a remote debugging instruction triggered by a user, a remote debugging request is generated according to the remote debugging instruction, and then the remote debugging request is sent to the reverse proxy server, so that the reverse proxy server establishes a data path between the web server and the reverse proxy server according to the remote debugging request; after the reverse proxy server receives a webpage access request sent by a webpage browser, the webpage access request is forwarded to the webpage server, so that the webpage server firstly obtains a target webpage according to the webpage access request and then sends the target webpage to the reverse proxy server. After receiving the target webpage forwarded by the reverse proxy server, the webpage browser displays the target webpage, acquires a debugging request triggered in the target webpage, and sends the debugging request to the reverse proxy server, so that the webpage server executes a debugging action corresponding to the debugging request on an application program to be debugged on a debugged terminal according to the debugging request after receiving the debugging request forwarded by the reverse proxy server.
The debugging end is internally provided with the webpage server, and the debugging end is internally provided with the webpage browser, so that the debugging end and the debugged end can communicate through the reverse proxy server, technicians can access and debug the intranet page server in the debugged end by using the webpage browser in the debugging end, and the debugging end can be debugged remotely. The debugging end is used for remotely debugging the debugged end based on the webpage, so that the debugging end can debug the debugged end using various operating systems, the adverse effect caused by the diversification of the operating systems of the debugged end can be effectively overcome, the debugging end is not influenced by the operating system used by the debugged end when debugging the debugged end, and the debugging effect is favorably improved. In addition, the webpage server is installed at the debugged end, so that the debugged end can directly acquire data required by remote debugging from the debugged end by means of the reverse proxy server, and leakage of user information can be effectively avoided.
In order to further understand the remote debugging method provided in the embodiment of the present application, a scenario embodiment will be described in conjunction with fig. 6 as a whole for the remote debugging method provided in the embodiment of the present application.
Scene embodiment
The scenario embodiment is an exemplary description of the remote debugging method provided by the method embodiment, and for the sake of brevity, the contents of parts in the scenario embodiment and the method embodiment are the same, and are not described herein again, and for technical details of the parts with the same contents, please refer to relevant contents in the method embodiment.
Referring to fig. 6, this figure is a flowchart of a remote debugging method applied in the remote debugging systems shown in fig. 1 and fig. 2 according to an embodiment of the present application.
The remote debugging method provided by the embodiment of the application comprises S601-S608:
s601: when a user selects to start remote debugging in an application program to be debugged on a debugged end, the debugged end sets the enabling state of the web server to be allowed to access, and the web server receives a remote debugging instruction triggered by the user.
S602: and the webpage server generates a remote debugging request according to the remote debugging instruction and sends the remote debugging request to the reverse proxy server.
S603: the reverse proxy server verifies the debugging authorization code carried in the remote debugging request, and establishes a data path between the webpage server and the reverse proxy server when the debugging authorization code carried in the remote debugging request is confirmed to pass the verification.
S604: after a technician inputs the website of the web server on the debugged end into the web browser on the debugged end and triggers a web access request, the web browser on the debugged end receives the web access request and sends the web access request to the reverse proxy server.
S605: after the webpage server receives the webpage access request forwarded by the reverse proxy server, the webpage server acquires a target webpage according to the webpage access request and sends the target webpage to the reverse proxy server.
S606: and after receiving the target webpage forwarded by the reverse proxy server, the webpage browser displays the target webpage.
S607: after the technician triggers a debug request on the target web page, the web browser receives the debug request and sends the debug request to the reverse proxy server.
S608: after the webpage server receives the debugging request forwarded by the reverse proxy server, the webpage server executes a debugging action corresponding to the debugging request to the application program to be debugged on the debugged terminal according to the debugging request.
Based on the relevant contents of S601 to S608, in the remote debugging system, since the debugged end is internally provided with the web server and the debugging end is internally provided with the web browser, the debugging end and the debugged end can communicate through the reverse proxy server, so that a technician can access and debug the intranet page server in the debugged end by using the web browser in the debugging end, and thus, the debugging end can perform remote debugging on the debugged end. The debugging end is used for remotely debugging the debugged end based on the webpage, so that the debugging end can debug the debugged end using various operating systems, the adverse effect caused by the diversification of the operating systems of the debugged end can be effectively overcome, the debugging end is not influenced by the operating system used by the debugged end when debugging the debugged end, and the debugging effect is favorably improved. In addition, the webpage server is installed at the debugged end, so that the debugged end can directly acquire data required by remote debugging from the debugged end by means of the reverse proxy server, and leakage of user information can be effectively avoided.
Based on the related content of the provided remote debugging method, the embodiment of the application also provides a corresponding remote debugging system, so that the provided remote debugging method is applied and realized in practice.
System embodiment
It should be noted that, the technical details of the remote debugging system provided in this embodiment may refer to the remote debugging method provided above.
As shown in fig. 1, the remote debugging system provided in the embodiment of the present application includes: a web server 101, a reverse proxy server 102, and a web browser 103; moreover, the web server 101 is installed at the debugged end, the web browser 103 is installed at the debugging end, and the debugged end and the debugging end communicate through the reverse proxy server 102;
the webpage server 101 is used for generating a remote debugging request according to a remote debugging instruction when receiving the remote debugging instruction triggered by a user, and sending the remote debugging request to the reverse proxy server 102;
the reverse proxy server 102 is used for establishing a data path between the web server 101 and the reverse proxy server 102 according to the remote debugging request; receiving a web page access request sent by a web browser 103, and sending the web page access request to a web server 101;
the web server 101 is further configured to, after receiving the web access request sent by the reverse proxy server 102, obtain a target web page according to the web access request, and send the target web page to the reverse proxy server 102;
the web browser 103 is configured to display a target web page after receiving the target web page sent by the reverse proxy server 102; acquiring a debugging request triggered in a target webpage and sending the debugging request to the reverse proxy server 102;
the web server 101 is further configured to, after receiving the debugging request sent by the reverse proxy server 102, execute a debugging action corresponding to the debugging request on the application program to be debugged on the debugged end according to the debugging request.
Optionally, on the basis of the remote debugging system shown in fig. 1, the web server 101 is specifically configured to: when the debugging request is a data acquisition request, acquiring target data of the application program to be debugged in the debugged terminal according to the debugging request; sending the target data to the reverse proxy server 102;
the reverse proxy server 102 is specifically configured to send the target data to the web browser 103;
the web browser 103 is specifically configured to display the target data after receiving the target data sent by the reverse proxy server 102.
Optionally, on the basis of the remote debugging system shown in fig. 1, the web server 101 is specifically configured to: and when the debugging request is a debugging operation execution request, debugging the application program to be debugged on the debugged end according to the debugging operation information carried by the debugging request.
Optionally, on the basis of the remote debugging system shown in fig. 1, the web server 101 is specifically configured to: sending the remote debugging instruction to a background server of the application program to be debugged, so that the background server of the application program to be debugged generates a debugging authorization code according to the remote debugging instruction; receiving a debugging authorization code sent by a background server of the application program to be debugged, and generating the remote debugging request according to the debugging authorization code;
the reverse proxy server 102 is specifically configured to: when it is determined that the debugging authorization code carried in the remote debugging request passes verification, a data path between the web server 101 and the reverse proxy server 102 is established.
Optionally, on the basis of the remote debugging system shown in fig. 1, if the initialization of the enabling state of the web server 101 is set to prohibit access, when a user selects to start remote debugging in an application to be debugged on the debugged end, the debugged end sets the enabling state of the web server 101 to be allowed to access, so that the web server 101 receives a remote debugging instruction triggered by the user.
Based on the related content of the remote debugging system, as the webpage server is installed in the debugged terminal and the webpage browser is installed in the debugging terminal, the debugging terminal and the debugged terminal can communicate through the reverse proxy server, so that a technician can access and debug the intranet page server in the debugged terminal by using the webpage browser in the debugging terminal, and thus, the debugging terminal can be used for remotely debugging the debugged terminal. The debugging end is used for remotely debugging the debugged end based on the webpage, so that the debugging end can debug the debugged end using various operating systems, the adverse effect caused by the diversification of the operating systems of the debugged end can be effectively overcome, the debugging end is not influenced by the operating system used by the debugged end when debugging the debugged end, and the debugging effect is favorably improved. In addition, the webpage server is installed at the debugged end, so that the debugged end can directly acquire data required by remote debugging from the debugged end by means of the reverse proxy server, and leakage of user information can be effectively avoided.
Based on the related content of the remote debugging method provided above, the embodiment of the present application further provides a corresponding remote debugging apparatus, so that the remote debugging method provided above is applied and implemented in practice.
Device embodiment
It should be noted that, the technical details of the remote debugging apparatus provided in this embodiment may refer to the remote debugging method provided above.
Referring to fig. 7, this figure is a schematic structural diagram of a remote debugging apparatus according to an embodiment of the present application.
The remote debugging apparatus 700 provided in the embodiment of the present application includes:
the generation unit 701 is configured to generate a remote debugging request according to a remote debugging instruction triggered by a user when the remote debugging instruction is received;
a first sending unit 702, configured to send the remote debugging request to a reverse proxy server, so that the reverse proxy server establishes a data path between the remote debugging apparatus and the reverse proxy server according to the remote debugging request; the data path is used for transmitting communication data between the webpage server and the reverse proxy server;
an obtaining unit 703, configured to obtain, after receiving a web page access request sent by the reverse proxy server, a target web page according to the web page access request; wherein the web page access request is received by the reverse proxy server from a web browser installed on a debugging end;
a second sending unit 704, configured to send the target web page to the reverse proxy server, so that the reverse proxy server sends the target web page to the web browser for display;
a debugging unit 705, configured to, after receiving a debugging request sent by the reverse proxy server, execute, according to the debugging request, a debugging action corresponding to the debugging request on the application to be debugged on the debugged end; wherein the debugging request is received by the reverse proxy server from the web browser.
Optionally, on the basis of the remote debugging apparatus 700 shown in fig. 7, the debugging unit 705 is specifically configured to: when the debugging request is a data acquisition request, acquiring target data of the application program to be debugged in the debugged terminal according to the debugging request; and sending the target data to the reverse proxy server so that the reverse proxy server sends the target data to the web browser for display.
Optionally, on the basis of the remote debugging apparatus 700 shown in fig. 7, the debugging unit 705 is specifically configured to: and when the debugging request is a debugging operation execution request, debugging the application program to be debugged on the debugged end according to the debugging operation information carried by the debugging request.
Optionally, on the basis of the remote debugging apparatus 700 shown in fig. 7, the generating unit 701 is specifically configured to: sending the remote debugging instruction to a background server of the application program to be debugged, so that the background server of the application program to be debugged generates a debugging authorization code according to the remote debugging instruction; and receiving a debugging authorization code sent by the background server of the application program to be debugged, and generating the remote debugging request according to the debugging authorization code.
Optionally, on the basis of the remote debugging apparatus 700 shown in fig. 7, as shown in fig. 8, the remote debugging apparatus 700 further includes:
a starting unit 706, configured to, if the initialization of the enable state of the remote debugging apparatus is set to prohibit access, set the enable state of the remote debugging apparatus to be an access permission state when a user selects to start remote debugging in an application to be debugged on the debugged end, so that the remote debugging apparatus receives a remote debugging instruction triggered by the user.
Based on the related content of the remote debugging apparatus 700, in the embodiment of the present application, since the remote debugging apparatus 700 performs remote debugging based on a web page, the remote debugging apparatus 700 can effectively overcome the adverse effect caused by the diversification of the operating system of the debugged terminal, so that the debugging terminal is no longer affected by the operating system used by the debugged terminal when debugging the debugged terminal, which is favorable for improving the debugging effect.
The embodiment of the present application further provides a terminal device for performing remote debugging, and the terminal device for performing remote debugging provided by the embodiment of the present application will be introduced from the perspective of hardware materialization.
Fig. 9 is a schematic structural diagram of a terminal device according to an embodiment of the present application. For convenience of explanation, only the parts related to the embodiments of the present application are shown, and details of the specific technology are not disclosed. The terminal may be any terminal device including a mobile phone, a tablet computer, a Personal Digital Assistant (PDA, for short, in english), a Sales terminal (POS, for short, in english), a vehicle-mounted computer, and the like, where the terminal is the tablet computer:
fig. 9 is a block diagram illustrating a partial structure of a tablet computer related to a terminal provided in an embodiment of the present application. Referring to fig. 9, the tablet computer includes: radio Frequency (RF) circuit 910, memory 920, input unit 930, display unit 940, sensor 950, audio circuit 960, wireless fidelity (WiFi) module 970, processor 980, and power supply 990. Those skilled in the art will appreciate that the tablet configuration shown in fig. 9 is not intended to be limiting of tablets and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The memory 920 may be used to store software programs and modules, and the processor 980 may execute various functional applications and data processing of the tablet computer by operating the software programs and modules stored in the memory 920. The memory 920 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the stored data area may store data (such as audio data, a phonebook, etc.) created according to the use of the tablet computer, and the like. Further, the memory 920 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 980 is a control center of the tablet pc, connects various parts of the entire tablet pc using various interfaces and lines, and performs various functions of the tablet pc and processes data by running or executing software programs and/or modules stored in the memory 920 and calling data stored in the memory 920, thereby integrally monitoring the tablet pc. Alternatively, processor 980 may include one or more processing units; preferably, the processor 980 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 980.
In the embodiment of the present application, the processor 980 included in the terminal further has the following functions:
when a remote debugging instruction triggered by a user is received, generating a remote debugging request according to the remote debugging instruction;
sending the remote debugging request to a reverse proxy server so that the reverse proxy server establishes a data path with the reverse proxy server according to the remote debugging request; the data path is used for transmitting communication data between the webpage server and the reverse proxy server;
after receiving a webpage access request sent by the reverse proxy server, acquiring a target webpage according to the webpage access request; wherein the web page access request is received by the reverse proxy server from a web browser installed on a debugging end;
sending the target webpage to the reverse proxy server so that the reverse proxy server sends the target webpage to the webpage browser for display;
after a debugging request sent by the reverse proxy server is received, executing a debugging action corresponding to the debugging request on an application program to be debugged on the debugged end according to the debugging request; wherein the debugging request is received by the reverse proxy server from the web browser.
Optionally, the processor 980 is further configured to perform the steps of any implementation manner of the remote debugging method provided in the embodiment of the present application.
The embodiment of the present application further provides a computer-readable storage medium, configured to store a computer program, where the computer program is configured to execute any implementation manner of a remote debugging method in the foregoing embodiments.
The present application further provides a computer program product including instructions, which when run on a computer, causes the computer to perform any one of the embodiments of a remote debugging method described in the foregoing embodiments.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing computer programs.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1. A remote debugging method is applied to a debuggee, wherein the debuggee is provided with a web server, and the method comprises the following steps:
when the webpage server receives a remote debugging instruction triggered by a user, the webpage server generates a remote debugging request according to the remote debugging instruction;
the webpage server sends the remote debugging request to a reverse proxy server so that the reverse proxy server establishes a data path between the webpage server and the reverse proxy server according to the remote debugging request; the data path is used for transmitting communication data between the webpage server and the reverse proxy server;
after the webpage server receives a webpage access request sent by the reverse proxy server, the webpage server acquires a target webpage according to the webpage access request; wherein the web page access request is received by the reverse proxy server from a web browser installed on a debugging end;
the webpage server sends the target webpage to the reverse proxy server so that the reverse proxy server sends the target webpage to the webpage browser for display;
after the webpage server receives a debugging request sent by the reverse proxy server, the webpage server executes a debugging action corresponding to the debugging request on an application program to be debugged on the debugged end according to the debugging request; wherein the debugging request is received by the reverse proxy server from the web browser.
2. The method according to claim 1, wherein when the debugging request is a data acquisition request, the web server executes, according to the debugging request, a debugging action corresponding to the debugging request for the application to be debugged on the debugged terminal, specifically:
the webpage server acquires target data of the application program to be debugged in the debugged end according to the debugging request;
and the webpage server sends the target data to the reverse proxy server so that the reverse proxy server sends the target data to the webpage browser for display.
3. The method according to claim 1, wherein when the debugging request is a debugging operation execution request, the web server executes, according to the debugging request, a debugging action corresponding to the debugging request for the application to be debugged on the debugged terminal, specifically:
and the webpage server debugs the application program to be debugged on the debugged end according to the debugging operation information carried by the debugging request.
4. The method of claim 1, wherein the web server generates a remote debugging request according to the remote debugging instruction, comprising:
the webpage server sends the remote debugging instruction to a background server of the application program to be debugged, so that the background server of the application program to be debugged generates a debugging authorization code according to the remote debugging instruction;
and the webpage server receives a debugging authorization code sent by the background server of the application program to be debugged, and generates the remote debugging request according to the debugging authorization code.
5. The method of claim 1, wherein when the initialization of the enabled state of the web server is set to disable access, the method further comprises:
when a user selects to start remote debugging in the application program to be debugged on the debugged end, the debugged end sets the enabling state of the web server to be allowed to access, so that the web server receives a remote debugging instruction triggered by the user.
6. A remote debugging system is characterized by comprising a webpage server, a reverse proxy server and a webpage browser, wherein the webpage server is installed at a debugged end, the webpage browser is installed at the debugging end, and the debugged end and the debugging end communicate through the reverse proxy server;
the webpage server is used for generating a remote debugging request according to a remote debugging instruction triggered by a user when receiving the remote debugging instruction, and sending the remote debugging request to the reverse proxy server;
the reverse proxy server is used for establishing a data path between the webpage server and the reverse proxy server according to the remote debugging request; receiving a webpage access request sent by the webpage browser, and sending the webpage access request to the webpage server; the data path is used for transmitting communication data between the webpage server and the reverse proxy server;
the webpage server is further used for acquiring a target webpage according to the webpage access request after receiving the webpage access request sent by the reverse proxy server, and sending the target webpage to the reverse proxy server;
the webpage browser is used for displaying a target webpage after receiving the target webpage sent by the reverse proxy server; acquiring a debugging request triggered in the target webpage, and sending the debugging request to the reverse proxy server;
and the webpage server is further used for executing a debugging action corresponding to the debugging request on the application program to be debugged on the debugged terminal according to the debugging request after receiving the debugging request sent by the reverse proxy server.
7. The system of claim 6, wherein the web server is specifically configured to:
sending the remote debugging instruction to a background server of the application program to be debugged, so that the background server of the application program to be debugged generates a debugging authorization code according to the remote debugging instruction; receiving a debugging authorization code sent by a background server of the application program to be debugged, and generating the remote debugging request according to the debugging authorization code;
the reverse proxy server is specifically configured to:
and when the debugging authorization code carried in the remote debugging request is confirmed to pass verification, establishing a data path between the webpage server and the reverse proxy server.
8. A remote debugging apparatus, comprising:
the device comprises a generating unit, a processing unit and a processing unit, wherein the generating unit is used for generating a remote debugging request according to a remote debugging instruction triggered by a user when the remote debugging instruction is received;
the first sending unit is used for sending the remote debugging request to a reverse proxy server so that the reverse proxy server establishes a data path between a webpage server and the reverse proxy server according to the remote debugging request; the data path is used for transmitting communication data between the webpage server and the reverse proxy server;
the acquisition unit is used for acquiring a target webpage according to the webpage access request after receiving the webpage access request sent by the reverse proxy server; wherein the web page access request is received by the reverse proxy server from a web browser installed on a debugging end;
a second sending unit, configured to send the target webpage to the reverse proxy server, so that the reverse proxy server sends the target webpage to the web browser for display;
the debugging unit is used for executing a debugging action corresponding to the debugging request on the application program to be debugged on the debugged end according to the debugging request after receiving the debugging request sent by the reverse proxy server; wherein the debugging request is received by the reverse proxy server from the web browser.
9. An apparatus, comprising a processor and a memory:
the memory is used for storing a computer program;
the processor is configured to perform the method of any of claims 1-5 in accordance with the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium is used to store a computer program for performing the method of any of claims 1-5.
CN202010505565.0A 2020-06-05 2020-06-05 Remote debugging method, system, webpage server, equipment and storage medium Pending CN113760688A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010505565.0A CN113760688A (en) 2020-06-05 2020-06-05 Remote debugging method, system, webpage server, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010505565.0A CN113760688A (en) 2020-06-05 2020-06-05 Remote debugging method, system, webpage server, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113760688A true CN113760688A (en) 2021-12-07

Family

ID=78784926

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010505565.0A Pending CN113760688A (en) 2020-06-05 2020-06-05 Remote debugging method, system, webpage server, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113760688A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114915565A (en) * 2022-05-06 2022-08-16 上海哔哩哔哩科技有限公司 Method and system for debugging network

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150309916A1 (en) * 2014-04-28 2015-10-29 Zihan Chen Remote debugging into mobile web applications across devices
CN105512538A (en) * 2015-12-11 2016-04-20 北京元心科技有限公司 debugging method and system of intelligent mobile operating system
CN108614767A (en) * 2016-12-13 2018-10-02 腾讯科技(深圳)有限公司 A kind of remote debugging method and device
CN108829591A (en) * 2018-05-31 2018-11-16 北京理工大学 A kind of synergic debugging system and method based on Web
CN108965420A (en) * 2018-07-06 2018-12-07 日立楼宇技术(广州)有限公司 A kind of adjustment method of car-mounted terminal, device, equipment and storage medium
CN109002366A (en) * 2018-07-26 2018-12-14 广东蔚海数问大数据科技有限公司 A kind of remote debugging method and device of mobile terminal webpage
CN109818742A (en) * 2017-11-22 2019-05-28 中兴通讯股份有限公司 A kind of apparatus debugging method, device and storage medium
CN111124874A (en) * 2018-10-31 2020-05-08 阿里巴巴集团控股有限公司 Method for debugging webpage, debugging server and main control equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150309916A1 (en) * 2014-04-28 2015-10-29 Zihan Chen Remote debugging into mobile web applications across devices
CN105512538A (en) * 2015-12-11 2016-04-20 北京元心科技有限公司 debugging method and system of intelligent mobile operating system
CN108614767A (en) * 2016-12-13 2018-10-02 腾讯科技(深圳)有限公司 A kind of remote debugging method and device
CN109818742A (en) * 2017-11-22 2019-05-28 中兴通讯股份有限公司 A kind of apparatus debugging method, device and storage medium
CN108829591A (en) * 2018-05-31 2018-11-16 北京理工大学 A kind of synergic debugging system and method based on Web
CN108965420A (en) * 2018-07-06 2018-12-07 日立楼宇技术(广州)有限公司 A kind of adjustment method of car-mounted terminal, device, equipment and storage medium
CN109002366A (en) * 2018-07-26 2018-12-14 广东蔚海数问大数据科技有限公司 A kind of remote debugging method and device of mobile terminal webpage
CN111124874A (en) * 2018-10-31 2020-05-08 阿里巴巴集团控股有限公司 Method for debugging webpage, debugging server and main control equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114915565A (en) * 2022-05-06 2022-08-16 上海哔哩哔哩科技有限公司 Method and system for debugging network
CN114915565B (en) * 2022-05-06 2023-09-19 上海哔哩哔哩科技有限公司 Network debugging method and system

Similar Documents

Publication Publication Date Title
CN109428878B (en) Vulnerability detection method, detection device and detection system
US10929266B1 (en) Real-time visual playback with synchronous textual analysis log display and event/time indexing
US20240037208A1 (en) Determining authentication sub-flow and client authentication based on tests transmitted to server-side software
US10698797B2 (en) Mobile application program testing method, server, terminal, and storage medium
CN106713004B (en) Router adaptation method and system
CN106254319B (en) Light application login control method and device
CN104536890A (en) Testing system, method and device
CN109729535B (en) Base station opening method and device, computer storage medium and equipment
CN111539775B (en) Application management method and device
CN105554136B (en) Backup Data restoring method, apparatus and system
CN114189553B (en) Flow playback method, system and computing device
CN114465867A (en) Server maintenance method and device, storage medium and processor
CN113760688A (en) Remote debugging method, system, webpage server, equipment and storage medium
CN106453200B (en) Data service access method and terminal
CN108737350B (en) Information processing method and client
CN115296999B (en) Mobile terminal hot repair method, device, hot repair system and readable storage medium
CN107391132B (en) Method, device and equipment for target App to execute preset action
CN113163014B (en) Data transmission method, server and data transmission system
CN111782291B (en) Method and device for starting test page
CN114915565A (en) Method and system for debugging network
CN111008345B (en) Method and system for accessing fixed-point access URL
CN113760727A (en) Interface regression testing method and device
CN113641580A (en) Mixed-mode mobile application debugging method and system
CN112486484A (en) Webpage version generation method and device
CN115248922A (en) Apparatus and method for remote access

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