CN114064514B - Webpage debugging method and debugging environment simulator - Google Patents
Webpage debugging method and debugging environment simulator Download PDFInfo
- Publication number
- CN114064514B CN114064514B CN202210046767.2A CN202210046767A CN114064514B CN 114064514 B CN114064514 B CN 114064514B CN 202210046767 A CN202210046767 A CN 202210046767A CN 114064514 B CN114064514 B CN 114064514B
- Authority
- CN
- China
- Prior art keywords
- debugging
- webpage
- debugged
- request instruction
- client
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/362—Software debugging
- G06F11/3644—Software debugging by instrumenting at runtime
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 invention discloses a webpage debugging method and a debugging environment simulator. The debugging environment simulator receives a page request instruction of the webpage to be debugged sent by the target browser in the process of loading the webpage to be debugged by the target browser, and returns debugging data matched with the page request instruction to the target browser in response to the page request instruction, so that the target browser debugges the webpage to be debugged based on the debugging data. When the webpage to be debugged is a webpage which needs to be opened and operated in a certain computer program (such as a client), the method can enable the webpage to be debugged to normally realize the function debugging of the webpage to be debugged without the corresponding response capability of the computer program in the process of carrying out the function debugging of the webpage to be debugged which needs certain response data, thereby enabling the function debugging process of the webpage to be debugged to be carried out independently without depending on the development process of the computer program, and effectively improving the function debugging efficiency and the development efficiency of the webpage to be debugged.
Description
Technical Field
The invention relates to the technical field of computer science, in particular to a webpage debugging method and a debugging environment simulator.
Background
With the development of computer science and technology, the development technology of web pages is continuously improved.
Currently, an embedded browser, such as webview, may be provided in a client (i.e., a client application), and the client may communicate with the embedded browser through some kind of communication component, such as jsbridge. Through the embedded browser, the client can render and display the webpage. At this time, the user can open and browse a web page in the client. It should be noted that, while the client is developed, the web page that needs to be run in the client (i.e., the client web page) may be developed at the same time.
In the process of developing a client webpage, sometimes a developed function needs to be debugged in time to perform the next development. When the client has the corresponding response capability, the function debugging of the client webpage can be normally completed.
However, when the development efficiency of the client is slow and the client cannot have corresponding response capability quickly, the function debugging of the client webpage may not be performed normally, which results in that the next development cannot be performed, and thus the development efficiency of the client webpage is slow.
Disclosure of Invention
In view of the above problems, the present invention provides a method for debugging a web page and a debugging environment simulator, which overcome or at least partially solve the above problems, and the technical solution is as follows:
a webpage debugging method is applied to a debugging environment simulator, and comprises the following steps:
the debugging environment simulator receives a page request instruction of a webpage to be debugged, which is sent by a target browser, in the process of loading the webpage to be debugged by the target browser;
and the debugging environment simulator responds to the page request instruction, and returns debugging data matched with the page request instruction to the target browser, so that the target browser debugs the webpage to be debugged based on the debugging data.
Optionally, the target browser is an embedded browser embedded in a client, the target browser interacts with the client through the debugging environment simulator, and the page request instruction is a client request instruction; the debugging environment simulator responds to the page request instruction, returns debugging data matched with the page request instruction to the target browser, and comprises the following steps:
the debugging environment simulator converts the page request instruction into a network request instruction which is suitable for the client and sends the network request instruction to the client;
the debugging environment simulator obtains response data returned by the client based on the network request instruction;
and the debugging environment simulator converts the response data into the debugging data adaptive to the target browser and sends the debugging data to the target browser.
Optionally, the target browser is a non-embedded browser; the debugging environment simulator responds to the page request instruction, returns debugging data matched with the page request instruction to the target browser, and comprises the following steps:
and the debugging environment simulator determines the debugging data matched with the page request instruction from a pre-established debugging data set and returns the debugging data to the target browser.
Optionally, the target browser is a non-embedded browser; the method further comprises the following steps:
the debugging environment simulator determines the type of a system platform where the target browser is located;
the debugging environment simulator responds to the page request instruction, returns debugging data matched with the page request instruction to the target browser, and comprises the following steps:
and the debugging environment simulator determines the debugging data matched with the page request instruction and the system platform type from a pre-established debugging data set and returns the debugging data to the target browser.
Optionally, the target browser is a non-embedded browser, and the page request instruction is a server request instruction; the debugging environment simulator responds to the page request instruction, returns debugging data matched with the page request instruction to the target browser, and comprises the following steps:
the debugging environment simulator converts the page request instruction into a network request instruction which is suitable for a server and sends the network request instruction to the server;
the debugging environment simulator obtains response data returned by the server based on the network request instruction;
and the debugging environment simulator converts the response data into the debugging data adaptive to the target browser and sends the debugging data to the target browser.
A debug environment simulator, comprising: a receiving unit and a first returning unit; wherein:
the receiving unit is used for receiving a page request instruction of the webpage to be debugged, which is sent by a target browser, in the process of loading the webpage to be debugged by the target browser;
the first returning unit is used for responding to the page request instruction, and returning debugging data matched with the page request instruction to the target browser so that the target browser debugs the webpage to be debugged based on the debugging data.
Optionally, the target browser is an embedded browser embedded in a client, the target browser interacts with the client through the debugging environment simulator, and the page request instruction is a client request instruction; the first return unit includes: the system comprises a first conversion unit, a first sending unit, a first obtaining unit, a second conversion unit and a second sending unit; wherein:
the first conversion unit is used for converting the page request instruction into a network request instruction suitable for the client;
the first sending unit is used for sending the network request instruction to the client;
the first obtaining unit is configured to obtain response data returned by the client based on the network request instruction;
the second conversion unit is used for converting the response data into the debugging data adapted to the target browser;
and the second sending unit is used for sending the debugging data to the target browser.
Optionally, the target browser is a non-embedded browser; the first return unit includes: a first determination unit and a second return unit;
the first determining unit is configured to determine, from a pre-created debug data set, the debug data that matches the page request instruction;
the second returning unit is used for returning the debugging data to the target browser.
Optionally, the target browser is a non-embedded browser; the debug environment simulator further comprises: a second determination unit; the first return unit includes: a third determining unit and a third returning unit; wherein:
the second determining unit is used for determining the type of the system platform where the target browser is located;
the third determining unit is configured to determine, from a pre-created debug data set, the debug data that matches the page request instruction and the type of the system platform;
the third returning unit is used for returning the debugging data to the target browser.
Optionally, the target browser is a non-embedded browser, and the page request instruction is a server request instruction; the first return unit includes: the system comprises a third conversion unit, a third sending unit, a second obtaining unit, a fourth conversion unit and a fourth sending unit; wherein:
the third conversion unit is used for converting the page request instruction into a network request instruction suitable for a server;
the third sending unit is configured to send the network request instruction to the server;
the second obtaining unit is configured to obtain response data returned by the server based on the network request instruction;
the fourth conversion unit is used for converting the response data into the debugging data adapted to the target browser;
the fourth sending unit is configured to send the debugging data to the target browser.
The webpage debugging method and the debugging environment simulator provided by the embodiment. The debugging environment simulator receives a page request instruction of a webpage to be debugged, which is sent by a target browser, in the process of loading the webpage to be debugged by the target browser; and the debugging environment simulator responds to the page request instruction and returns debugging data matched with the page request instruction to the target browser, so that the target browser debugs the webpage to be debugged based on the debugging data. When the webpage to be debugged is a webpage which needs to be opened and operated in a certain computer program (such as a client and a server), the method can normally realize the function debugging of the webpage to be debugged without the corresponding response capability of the computer program in the process of carrying out the function debugging of the webpage to be debugged which needs certain response data, thereby enabling the function debugging process of the webpage to be debugged to be carried out independently without depending on the development process of the computer program, effectively improving the function debugging efficiency of the webpage to be debugged and effectively improving the development efficiency of the webpage to be debugged.
The foregoing description is only an overview of the technical solutions of the present invention, and the following detailed description of the present invention is provided to enable the technical means of the present invention to be more clearly understood, and to enable the above and other objects, features, and advantages of the present invention to be more clearly understood.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart illustrating a first method for debugging a web page according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a second method for debugging a web page according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a fourth webpage debugging method according to an embodiment of the present invention;
fig. 4 shows a schematic structural diagram of a debugging environment simulator provided by an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
As shown in fig. 1, the present embodiment proposes a first webpage debugging method, which can be applied to a debugging environment simulator. The method may comprise the steps of:
s101, a debugging environment simulator receives a page request instruction of a webpage to be debugged, which is sent by a target browser, in the process of loading the webpage to be debugged by the target browser;
the debugging environment simulator can simulate various environments such as a client environment or a server environment and the like required by the webpage to be debugged in the debugging process, so that the webpage to be debugged can be subjected to function debugging without waiting for the development process of a client or other computer programs (such as a server), the development process of the webpage to be debugged can be independently carried out without being separated from the development of the corresponding computer programs, and the webpage debugging efficiency and the development efficiency are improved.
Optionally, the target browser may be an embedded browser, that is, a browser that needs to be embedded in some computer program (such as a client and a server) to normally operate, such as webview;
optionally, the target browser may also be a non-embedded browser, that is, a browser capable of directly rendering and displaying a web page, which can be operated independently from some computer programs (such as a client and a server).
The webpage to be debugged may be a certain webpage whose function needs to be debugged.
Specifically, the webpage to be debugged may be a certain webpage in development and requiring to debug the function; the webpage to be debugged may also be a certain webpage that has been developed and needs to debug the function.
Optionally, the webpage to be debugged may be a client webpage, that is, a webpage that needs to be opened and operated in the client;
optionally, the webpage to be debugged may also be a non-client webpage, such as a webpage that can be opened and run in a non-embedded browser.
The page request instruction may be a request instruction that needs to be sent to a corresponding computer program (such as a client and a server) to obtain response data of the computer program when a certain function of a web page to be debugged is debugged.
Specifically, the target browser may execute the code of the webpage to be debugged in the process of loading the webpage to be debugged. Optionally, when a certain function of the web page to be debugged needs to be debugged by a corresponding computer program (such as a client and a server), the target browser may execute a code corresponding to the function, and send a corresponding page request instruction to the computer program, so as to request the computer program to obtain corresponding response data.
It should be noted that, when the target browser renders and displays the webpage to be debugged, at least one virtual button may be displayed in the webpage to be debugged, and the user may input a corresponding instruction through the virtual button to control the debugging process of the webpage to be debugged. At this time, the target browser may also send a corresponding page request instruction to the computer program in response to an instruction input by the user.
S102, the debugging environment simulator responds to the page request instruction, and returns debugging data matched with the page request instruction to the target browser, so that the target browser debugs the webpage to be debugged based on the debugging data.
The debugging data may be data that needs a certain computer program (such as a client and a server) to return in response to a page request instruction in order to normally complete function debugging when a certain function is debugged by a to-be-debugged web page.
It should be noted that the debugging environment simulator may replace some computer program (such as a client and a server), receive a page request instruction sent by the target browser, and return corresponding debugging data to the target browser, so that the function debugging of the to-be-debugged web page may be performed normally without departing from the computer program.
Specifically, the debugging environment simulator may, after receiving the page request instruction, respond to the page request instruction, search for or generate debugging data corresponding to the page request instruction, and return the debugging data to the target browser. After the target browser obtains the debugging data, the target browser can normally continue to perform the function debugging of the webpage to be debugged so as to complete the function debugging of the webpage to be debugged.
Optionally, as shown in fig. 2, in the second webpage debugging method provided in this embodiment, the target browser is an embedded browser embedded in the client, the target browser interacts with the client through the debugging environment simulator, and the page request instruction is a client request instruction; at this time, step S102 may include:
s10211, the debugging environment simulator converts the page request instruction into a network request instruction suitable for the client and sends the network request instruction to the client;
s10212, the debugging environment simulator obtains response data returned by the client based on the network request instruction;
s10213, the debugging environment simulator converts the response data into debugging data adaptive to the target browser and sends the debugging data to the target browser.
Specifically, the web page to be debugged may be a web page that needs to be opened and run in the client. At this time, a target browser can be embedded in the client, and the client can run the webpage to be debugged through the target browser.
It should be noted that, when the client has a response capability corresponding to the function to be debugged of the web page to be debugged, the debugging environment simulator may simulate the environment of the client interface, and perform the same function as the communication component, such as jsbridge, so that the target browser and the client may communicate through the debugging environment simulator. At this time, the debugging environment simulator may return debugging data to the target browser without replacing the client, but may convert the page request instruction of the target browser into a network request instruction that can be recognized by the client and send the network request instruction to the client, and the client directly performs an actual response. At this time, the client may generate corresponding response data based on the network request instruction, and return the response data to the target browser through the debugging environment simulator, so that the target browser completes corresponding function debugging on the webpage to be debugged.
Optionally, the target browser is a non-embedded browser; the debugging environment simulator responds to the page request instruction and returns debugging data matched with the page request instruction to the target browser, and the debugging data comprises the following steps:
and the debugging environment simulator determines debugging data matched with the page request instruction from the pre-established debugging data set and returns the debugging data to the target browser.
It should be noted that, when the web page to be debugged is a web page that needs to be run in the client, that is, a client web page, and the client does not yet have the response capability required for the function debugging of the web page to be debugged, the present invention may open and debug the web page to be debugged using a non-embedded browser.
Specifically, the invention can create debugging data required by debugging various functions of the webpage to be debugged in advance and place the debugging data into the debugging data set. At this time, when the debugging environment simulator receives the page request instruction, the debugging environment simulator can select corresponding debugging data from the debugging data set and return the corresponding debugging data to the target browser, so that the target browser can continue to perform function debugging on the webpage to be debugged based on the debugging data, and the function debugging on the webpage to be debugged is completed.
Optionally, when the webpage to be debugged is a webpage that needs to be run in the client, that is, a client webpage, and the client has a response capability required for performing function debugging on the webpage to be debugged, the method and the device of the invention can also perform function debugging on the webpage to be debugged without using an embedded browser and the client, and can open and debug the webpage to be debugged by using a non-embedded browser.
It can be understood that, when the webpage to be debugged is a webpage that needs to be run in the client, that is, a client webpage, the debugging environment simulator can implement function debugging of the webpage to be debugged regardless of whether the client has a response capability corresponding to a function to be debugged of the webpage to be debugged.
It can be understood that, when the web page to be debugged is a web page that needs to be opened and operated in a certain computer program (such as a client and a server), the process shown in fig. 1 is executed, so that the function debugging of the web page to be debugged can be normally realized without the corresponding response capability of the computer program in the process of performing the function debugging of the web page to be debugged that needs certain response data, and thus the function debugging process of the web page to be debugged can be performed independently without depending on the development process of the computer program, the function debugging efficiency of the web page to be debugged can be effectively improved, and the development efficiency of the web page to be debugged can be effectively improved.
The webpage debugging method provided by the embodiment can be applied to a debugging environment simulator. The debugging environment simulator receives a page request instruction of a webpage to be debugged, which is sent by a target browser, in the process of loading the webpage to be debugged by the target browser; and the debugging environment simulator responds to the page request instruction and returns debugging data matched with the page request instruction to the target browser, so that the target browser debugs the webpage to be debugged based on the debugging data. When the webpage to be debugged is a webpage which needs to be opened and operated in a certain computer program (such as a client and a server), the method can normally realize the function debugging of the webpage to be debugged without the corresponding response capability of the computer program in the process of carrying out the function debugging of the webpage to be debugged which needs certain response data, thereby enabling the function debugging process of the webpage to be debugged to be carried out independently without depending on the development process of the computer program, effectively improving the function debugging efficiency of the webpage to be debugged and effectively improving the development efficiency of the webpage to be debugged.
Referring to fig. 1, the present embodiment proposes a third webpage debugging method. The method may further include step S201, in which case step S102 may be embodied as S1022. Wherein:
s201, a debugging environment simulator determines the type of a system platform where a target browser is located;
it should be noted that the operating characteristics of the target browser on different system platform types (e.g., system platforms produced by different manufacturers) may be different. The page display form, the data type and the debugging data of the webpage to be debugged of the target browser running on different system platform types can also be different. Therefore, when the function of the webpage to be debugged is debugged, the corresponding debugging data can be returned to the system platform according to the system platform where the target browser is located.
S1022, the debugging environment simulator determines debugging data matched with the page request instruction and the system platform type from the pre-established debugging data set, and returns the debugging data to the target browser, so that the target browser debugs the webpage to be debugged based on the debugging data.
Specifically, the debugging environment simulator may determine in advance the type of the system platform where the target browser is located. The debugging environment simulator can identify the type of the system platform based on the system platform identification carried in the information sent by the target browser.
Specifically, after receiving the page request instruction, the debugging environment simulator may find out corresponding debugging data from a pre-created debugging data set and return the corresponding debugging data to the target browser.
It can be understood that the debugging environment simulator can simulate the system platform environment required by the webpage to be debugged, so that the webpage to be debugged can be subjected to function debugging on different system platforms.
The webpage debugging method provided by the embodiment can simulate the system platform environment required by the webpage to be debugged, so that the webpage to be debugged can be subjected to function debugging on different system platforms.
Referring to fig. 1, as shown in fig. 3, the present embodiment proposes a fourth webpage debugging method. In the method, a target browser is a non-embedded browser, and a page request instruction is a server request instruction; at this time, step S102 may include the steps of:
s10231, the debugging environment simulator converts the page request instruction into a network request instruction adapted to the server and sends the network request instruction to the server;
it should be noted that, when a webpage to be debugged is debugged for a certain function, it may be necessary for the server corresponding to the client to return corresponding response data, so that the debugging can be normally completed. At this time, the debugging environment simulator can simulate the client environment, the data interaction environment between the client and the server, and the server environment, and return response data required for normal debugging of the webpage to be debugged to the target browser.
Specifically, the debugging environment simulator may convert the page request instruction into an instruction recognizable by the server and send the instruction to the server when receiving the page request instruction.
S10232, the debugging environment simulator obtains response data returned by the server based on the network request instruction;
and S10233, the debugging environment simulator converts the response data into debugging data adaptive to the target browser and sends the debugging data to the target browser.
It can be understood that the debugging environment simulator can realize the debugging of various functions of the webpage to be debugged, realize the diversity of debugging functions, and further improve the debugging efficiency and the development efficiency of the webpage to be debugged.
The webpage debugging method provided by the embodiment can further improve the debugging efficiency and the development efficiency of the webpage to be debugged.
Based on fig. 1, the present embodiment proposes a fifth webpage debugging method. In such an approach, the debug environment simulator may include simulation of client interfaces, simulation of interaction patterns, simulation of system platform characteristics, simulation of request agents, simulation of data returns, and simulation of operating conditions.
In the simulation process of the client interface, a target browser can be used for loading a webpage to be debugged and loading a debugging environment simulator, the debugging environment simulator can simulate the client interface, and the target browser can call the client interface to return corresponding response data in the process of loading the webpage to be debugged;
in the simulation process of the platform characteristics, a target browser can be used for loading a webpage to be debugged and loading a debugging environment simulator, the debugging environment simulator can be used for simulating the platform characteristics, the target browser can determine the current system platform type by using the logic for judging the system platform type in the webpage to be debugged, return under different conditions is carried out according to the corresponding characteristics of the system platform type, the target browser is triggered to execute the corresponding page platform logic, and the corresponding platform is displayed;
in the simulation process of the request agent, a target browser can be used for loading a webpage to be debugged and loading a debugging environment simulator, and the debugging environment simulator can simulate the request agent; the target browser can trigger an http request agent in the process of loading the webpage to be debugged, and respectively carry out conversion requests of different parameters to the debugging environment simulator; the debugging environment simulator can send a corresponding network request to the back end, obtain response data returned by the back end and return the response data to the target browser for corresponding display;
in the simulation process of data return, a target browser can be used for loading a webpage to be debugged and loading a debugging environment simulator, the target browser can send a data response request to the debugging environment simulator in the process of loading the webpage to be debugged, and at the moment, the debugging environment simulator can directly return corresponding response data to the target browser.
It should be noted that, the debugging environment simulator can perform one-to-one customized environment simulation for various modes encountered by the web page in the development process, so that the debugging environment simulator and the target browser have debugging capabilities for the web page in various modes, so as to smoothly perform function debugging of the web page, and improve the debugging efficiency and the development efficiency of the web page. In the prior art, the next development and debugging can be carried out only when the host environment of the webpage has corresponding response capability, and the method can ensure that the webpage can be developed and debugged independently from the host environment, eliminate the hysteresis caused by low development efficiency of the host environment, ensure more efficient development, enrich and free development tools and increase the diversity of development schemes.
Corresponding to the method shown in fig. 1, the present embodiment provides a debug environment simulator as shown in fig. 4. The debug environment simulator may include: a receiving unit 101 and a first returning unit 102; wherein:
the receiving unit 101 is configured to receive a page request instruction of a webpage to be debugged, which is sent by a target browser, in a process of loading the webpage to be debugged by the target browser;
the first returning unit 102 is configured to, in response to the page request instruction, return debugging data matched with the page request instruction to the target browser, so that the target browser debugs the web page to be debugged based on the debugging data.
It should be noted that, specific processing procedures of the receiving unit 101 and the first returning unit 102 and technical effects brought by the processing procedures may respectively refer to steps S101 and S102 in fig. 1, and are not described herein again.
Optionally, the target browser is an embedded browser embedded in a client, the target browser interacts with the client through the debugging environment simulator, and the page request instruction is a client request instruction; the first returning unit 102 includes: the system comprises a first conversion unit, a first sending unit, a first obtaining unit, a second conversion unit and a second sending unit; wherein:
the first conversion unit is used for converting the page request instruction into a network request instruction suitable for the client;
the first sending unit is used for sending the network request instruction to the client;
the first obtaining unit is configured to obtain response data returned by the client based on the network request instruction;
the second conversion unit is used for converting the response data into the debugging data adapted to the target browser;
and the second sending unit is used for sending the debugging data to the target browser.
Optionally, the target browser is a non-embedded browser; the first returning unit 102 includes: a first determination unit and a second return unit;
the first determining unit is configured to determine, from a pre-created debug data set, the debug data that matches the page request instruction;
the second returning unit is used for returning the debugging data to the target browser.
Optionally, the target browser is a non-embedded browser; the debug environment simulator further comprises: a second determination unit; the first returning unit 102 includes: a third determining unit and a third returning unit; wherein:
the second determining unit is used for determining the type of the system platform where the target browser is located;
the third determining unit is configured to determine, from a pre-created debug data set, the debug data that matches the page request instruction and the type of the system platform;
the third returning unit is used for returning the debugging data to the target browser.
Optionally, the target browser is a non-embedded browser, and the page request instruction is a server request instruction; the first returning unit 102 includes: the system comprises a third conversion unit, a third sending unit, a second obtaining unit, a fourth conversion unit and a fourth sending unit; wherein:
the third conversion unit is used for converting the page request instruction into a network request instruction suitable for a server;
the third sending unit is configured to send the network request instruction to the server;
the second obtaining unit is configured to obtain response data returned by the server based on the network request instruction;
the fourth conversion unit is used for converting the response data into the debugging data adapted to the target browser;
the fourth sending unit is configured to send the debugging data to the target browser.
The debugging environment simulator provided by the embodiment can receive a page request instruction of a webpage to be debugged, which is sent by a target browser, in the process of loading the webpage to be debugged by the target browser; and the debugging environment simulator responds to the page request instruction and returns debugging data matched with the page request instruction to the target browser, so that the target browser debugs the webpage to be debugged based on the debugging data. When the webpage to be debugged is a webpage which needs to be opened and operated in a certain computer program (such as a client and a server), the method can normally realize the function debugging of the webpage to be debugged without the corresponding response capability of the computer program in the process of carrying out the function debugging of the webpage to be debugged which needs certain response data, thereby enabling the function debugging process of the webpage to be debugged to be carried out independently without depending on the development process of the computer program, effectively improving the function debugging efficiency of the webpage to be debugged and effectively improving the development efficiency of the webpage to be debugged.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims (2)
1. A webpage debugging method is applied to a debugging environment simulator, and comprises the following steps:
the debugging environment simulator receives a page request instruction of a webpage to be debugged, which is sent by a target browser, in the process of loading the webpage to be debugged by the target browser; the webpage to be debugged is a client webpage;
when the target browser is an embedded browser embedded in a client, the debugging environment simulator converts the page request instruction into a network request instruction adaptive to the client and sends the network request instruction to the client;
the debugging environment simulator obtains response data returned by the client based on the network request instruction;
the debugging environment simulator converts the response data into debugging data adaptive to the embedded browser and sends the debugging data to the embedded browser;
when the target browser is a non-embedded browser, the debugging environment simulator determines the type of a system platform where the target browser is located;
the debugging environment simulator is used for simulating a client environment corresponding to the system platform; and the debugging environment simulator determines the debugging data matched with the page request instruction and the system platform type from a pre-established debugging data set, and returns the debugging data to the non-embedded browser.
2. A debug environment simulator, comprising: a receiving unit and a first returning unit; wherein:
the receiving unit is used for receiving a page request instruction of the webpage to be debugged, which is sent by a target browser, in the process of loading the webpage to be debugged by the target browser; the webpage to be debugged is a client webpage;
the first returning unit is used for responding to the page request instruction and returning debugging data matched with the page request instruction to the target browser so that the target browser debugs the webpage to be debugged based on the debugging data;
the first return unit includes: the system comprises a first conversion unit, a first sending unit, a first obtaining unit, a second conversion unit and a second sending unit;
the first conversion unit is used for converting the page request instruction into a network request instruction adapted to the client when the target browser is an embedded browser embedded in the client;
the first sending unit is used for sending the network request instruction to the client;
the first obtaining unit is configured to obtain response data returned by the client based on the network request instruction;
the second conversion unit is used for converting the response data into the debugging data adapted to the embedded browser;
the second sending unit is used for sending the debugging data to the embedded browser;
the debug environment simulator further comprises: a second determination unit; the first return unit further includes: a third determining unit and a third returning unit;
the second determining unit is used for determining the type of a system platform where the target browser is located when the target browser is a non-embedded browser;
the third determining unit is used for simulating a client environment corresponding to the system platform; determining the debugging data matched with the page request instruction and the system platform type from a pre-established debugging data set;
and the third returning unit is used for returning the debugging data to the non-embedded browser.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210046767.2A CN114064514B (en) | 2022-01-17 | 2022-01-17 | Webpage debugging method and debugging environment simulator |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210046767.2A CN114064514B (en) | 2022-01-17 | 2022-01-17 | Webpage debugging method and debugging environment simulator |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114064514A CN114064514A (en) | 2022-02-18 |
CN114064514B true CN114064514B (en) | 2022-04-26 |
Family
ID=80231010
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210046767.2A Active CN114064514B (en) | 2022-01-17 | 2022-01-17 | Webpage debugging method and debugging environment simulator |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114064514B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104539682A (en) * | 2014-12-19 | 2015-04-22 | 乐视网信息技术(北京)股份有限公司 | Debug method, device, mobile terminal, server and system for mobile webpage |
CN105930266A (en) * | 2016-04-11 | 2016-09-07 | 北京小米移动软件有限公司 | Webpage debugging method and device |
CN112559350A (en) * | 2020-12-16 | 2021-03-26 | 杭州数梦工场科技有限公司 | Debugging method, device and equipment for front-end development page and storage medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060026260A1 (en) * | 2004-07-28 | 2006-02-02 | Mullen Jeffrey T | Method of communicating between web applications and local client application while maintaining remote user session |
-
2022
- 2022-01-17 CN CN202210046767.2A patent/CN114064514B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104539682A (en) * | 2014-12-19 | 2015-04-22 | 乐视网信息技术(北京)股份有限公司 | Debug method, device, mobile terminal, server and system for mobile webpage |
CN105930266A (en) * | 2016-04-11 | 2016-09-07 | 北京小米移动软件有限公司 | Webpage debugging method and device |
CN112559350A (en) * | 2020-12-16 | 2021-03-26 | 杭州数梦工场科技有限公司 | Debugging method, device and equipment for front-end development page and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN114064514A (en) | 2022-02-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6188975B1 (en) | Programmatic use of software debugging to redirect hardware related operations to a hardware simulator | |
CN107688529B (en) | Component debugging method and device | |
US20020165993A1 (en) | System and method of partitioning software components of a monolithic component-based application program to separate graphical user interface elements for local execution at a client system in conjunction with remote execution of the application program at a server system | |
EP2831704A1 (en) | Instantiable gesture objects | |
US9122798B2 (en) | Debugger with method restart capability | |
US6785884B1 (en) | Symbolic debug interface for register transfer simulator debugger | |
US7840948B2 (en) | Automation of keyboard accessibility testing | |
CN110727429A (en) | Front-end page generation method, device and equipment | |
CN111475412B (en) | Software testing method, device, electronic equipment and computer readable storage medium | |
CN112506778A (en) | WEB user interface automatic test method, device, equipment and storage medium | |
CN112988588B (en) | Client software debugging method and device, storage medium and electronic equipment | |
CN114064514B (en) | Webpage debugging method and debugging environment simulator | |
WO2015063782A1 (en) | Communicating with unsupported input device | |
EP1025489A1 (en) | System to associate control with applications using drag and drop interface | |
CN112491940A (en) | Request forwarding method and device of proxy server, storage medium and electronic equipment | |
CN114741294A (en) | Page debugging method, device, equipment and storage medium | |
EP2115574B1 (en) | Employing a buffer to facilitate instruction execution | |
CN114816672A (en) | Virtual machine creation method and device, electronic equipment and storage medium | |
CN114745313A (en) | Terminal remote testing method and device, electronic equipment and readable medium | |
JP5299625B2 (en) | Operation support apparatus, operation support method, and program | |
CN114579461A (en) | Browser compatibility detection method and related equipment | |
US10996963B2 (en) | Integrating web-based tutorials into websites using a tag manager | |
WO2004088508A2 (en) | A method of creating software that is portable across different operating systems | |
Chen et al. | A gui-based automated test system for android applications | |
CN110347577B (en) | Page testing method, device and equipment thereof |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |