CN114064514A - Webpage debugging method and debugging environment simulator - Google Patents

Webpage debugging method and debugging environment simulator Download PDF

Info

Publication number
CN114064514A
CN114064514A CN202210046767.2A CN202210046767A CN114064514A CN 114064514 A CN114064514 A CN 114064514A CN 202210046767 A CN202210046767 A CN 202210046767A CN 114064514 A CN114064514 A CN 114064514A
Authority
CN
China
Prior art keywords
debugging
request instruction
target browser
webpage
environment simulator
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.)
Granted
Application number
CN202210046767.2A
Other languages
Chinese (zh)
Other versions
CN114064514B (en
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.)
Feihu Information Technology Tianjin Co Ltd
Original Assignee
Feihu Information Technology Tianjin 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 Feihu Information Technology Tianjin Co Ltd filed Critical Feihu Information Technology Tianjin Co Ltd
Priority to CN202210046767.2A priority Critical patent/CN114064514B/en
Publication of CN114064514A publication Critical patent/CN114064514A/en
Application granted granted Critical
Publication of CN114064514B publication Critical patent/CN114064514B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/3644Software 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

Webpage debugging method and debugging environment simulator
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 (10)

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;
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.
2. The webpage debugging method of claim 1, wherein 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.
3. The web page debugging method according to claim 1, wherein 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.
4. The web page debugging method according to claim 1, wherein 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.
5. The webpage debugging method of claim 1, wherein 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.
6. 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.
7. The debugging environment simulator of claim 6, wherein 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.
8. The debugging environment simulator of claim 6, wherein said 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.
9. The debugging environment simulator of claim 6, wherein said 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.
10. The debugging environment simulator of claim 6, wherein the target browser is a non-embedded browser, and the page request command is a server request command; 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.
CN202210046767.2A 2022-01-17 2022-01-17 Webpage debugging method and debugging environment simulator Active CN114064514B (en)

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 true CN114064514A (en) 2022-02-18
CN114064514B 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 (4)

* Cited by examiner, † Cited by third party
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
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
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
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
CN114064514B (en) 2022-04-26

Similar Documents

Publication Publication Date Title
KR101645052B1 (en) Debugging pipeline
US7783867B2 (en) Controlling instruction execution in a processing environment
CN107688529B (en) Component debugging method and device
WO2013148293A1 (en) Instantiable gesture objects
US6785884B1 (en) Symbolic debug interface for register transfer simulator debugger
US20140310724A1 (en) Testing system with methodology for background application control
US7840948B2 (en) Automation of keyboard accessibility testing
CN110727429A (en) Front-end page generation method, device and equipment
CN113360379B (en) Program test environment creation method and program test environment creation apparatus
CN112988588B (en) Client software debugging method and device, storage medium and electronic equipment
CN114064514B (en) Webpage debugging method and debugging environment simulator
JP5444724B2 (en) Verification support program, information processing apparatus, and verification support method
JP2022129520A (en) Test support system, test support method and program
EP1025489B1 (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
CN116248526A (en) Method and device for deploying container platform and electronic equipment
CN114741294A (en) Page debugging method, device, equipment and storage medium
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
US10996963B2 (en) Integrating web-based tutorials into websites using a tag manager
CN114579461A (en) Browser compatibility detection method and related equipment
Chen et al. A gui-based automated test system for android applications
CN112559336A (en) Method, device and system for adaptively debugging heterogeneous computing chip and mainboard chip
JP2003150405A (en) Debug method for equipment incorporating program

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