CN111953718A - Page debugging method and device - Google Patents
Page debugging method and device Download PDFInfo
- Publication number
- CN111953718A CN111953718A CN201910404950.3A CN201910404950A CN111953718A CN 111953718 A CN111953718 A CN 111953718A CN 201910404950 A CN201910404950 A CN 201910404950A CN 111953718 A CN111953718 A CN 111953718A
- Authority
- CN
- China
- Prior art keywords
- debugging
- page
- http request
- mobile
- response information
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 37
- 230000004044 response Effects 0.000 claims abstract description 66
- 230000003993 interaction Effects 0.000 claims description 33
- 238000004590 computer program Methods 0.000 claims description 10
- 230000007547 defect Effects 0.000 abstract description 4
- 238000010586 diagram Methods 0.000 description 13
- 238000004891 communication Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 7
- 230000008569 process Effects 0.000 description 7
- 238000012545 processing Methods 0.000 description 6
- 230000004048 modification Effects 0.000 description 4
- 238000012986 modification Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 230000008901 benefit Effects 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- VYZAMTAEIAYCRO-UHFFFAOYSA-N Chromium Chemical compound [Cr] VYZAMTAEIAYCRO-UHFFFAOYSA-N 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a page debugging method and device, and relates to the technical field of computers. One embodiment of the method comprises: acquiring an HTTP request sent by a mobile terminal page; receiving a first debugging instruction of a debugging end to the mobile end page, and modifying the HTTP request according to the first debugging instruction; sending the modified HTTP request to a remote server, and acquiring response information of the remote server to the modified HTTP request; receiving a second debugging instruction of the debugging end to the mobile end page, and modifying the response information according to the second debugging instruction; and sending the modified response information to the mobile terminal page. The implementation method can save hardware cost and overcome the defect that wifi hot spots are unstable, thereby improving debugging efficiency and being not limited by debugging places.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a page debugging method and device.
Background
With the popularization of mobile devices such as smart phones and tablet computers, the demand of mobile end web pages has increased dramatically, and mainstream user terminals for web page development have been changed from computers to these mobile devices. The debugging of the webpage of the mobile terminal relates to the problem of the mutual access between the mobile equipment and the computer. However, in some scenarios, when the mobile device and the computer cannot be located in the same local area network or cannot be directly accessed, a trouble is brought to the debugging work of the mobile terminal web page.
The existing solution is to transmit wifi (wireless fidelity) hot spot on the computer to connect to the mobile phone, so that the mobile phone and the computer are in the same local area network to access the computer. Because the wireless network card is needed to be arranged in the wifi hotspot, most desktop computers do not have the wireless network card, most notebook computers only have one wireless network card, the wifi hotspot is emitted and needs to be virtualized into two network cards, so that the wifi hotspot is unstable, and in addition, certain specific environments do not allow the wifi hotspot to be emitted.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
the problems that extra hardware is needed, wifi hot spots are unstable, debugging places are limited and the like exist when the mobile device and the computer cannot be directly accessed, so that hardware cost consumption is increased, debugging efficiency is reduced, and the debugging places are restricted.
Disclosure of Invention
In view of this, embodiments of the present invention provide a page debugging method and apparatus, which can save hardware cost, overcome the defect of unstable wifi hot spot, improve debugging efficiency, and are not limited by a debugging location.
To achieve the above object, according to an aspect of an embodiment of the present invention, a page debugging method is provided.
A page debugging method comprises the following steps: acquiring an HTTP (hyper text transfer protocol) request sent by a mobile terminal page; receiving a first debugging instruction of a debugging end to the mobile end page, and modifying the HTTP request according to the first debugging instruction; sending the modified HTTP request to a remote server, and acquiring response information of the remote server to the modified HTTP request; receiving a second debugging instruction of the debugging end to the mobile end page, and modifying the response information according to the second debugging instruction; and sending the modified response information to the mobile terminal page.
Optionally, performing information interaction with the mobile end page and the remote server through an HTTP proxy service, where the information interaction with the mobile end page includes: receiving the HTTP request and sending the modified response information; the information interaction with the remote server comprises: sending the modified HTTP request and acquiring the response information; and providing a Web page through a Web servo service which establishes network connection with the HTTP proxy service, receiving a first debugging instruction of a debugging end to the mobile end page through the Web page, modifying the HTTP request according to the first debugging instruction, receiving a second debugging instruction of the debugging end to the mobile end page, and modifying the response information according to the second debugging instruction.
Optionally, the debugging terminal is a fixed terminal that cannot be accessed by the mobile terminal, and the HTTP proxy service and the Web server service are located on a server or a terminal device that can be accessed by the mobile terminal and the fixed terminal.
Optionally, the HTTP proxy service and the Web service are implemented by a node.js (Javascript operating environment) program or a Java program.
According to another aspect of the embodiments of the present invention, a page debugging apparatus is provided.
A page debugging apparatus, comprising: the interaction module is used for acquiring an HTTP request sent by a mobile terminal page; the debugging module is used for receiving a first debugging instruction of a debugging end to the mobile end page and modifying the HTTP request according to the first debugging instruction; the interaction module is further used for sending the modified HTTP request to a remote server and acquiring response information of the remote server to the modified HTTP request; the debugging module is also used for receiving a second debugging instruction of the debugging end to the mobile end page and modifying the response information according to the second debugging instruction; and the interaction module is also used for sending the modified response information to the mobile terminal page.
Optionally, the interaction module is further configured to perform information interaction with the mobile end page and the remote server through an HTTP proxy service, where the information interaction with the mobile end page includes: receiving the HTTP request and sending the modified response information; the information interaction with the remote server comprises: sending the modified HTTP request and acquiring the response information; the debugging module is also used for providing a Web page through a Web servo service which establishes network connection with the HTTP proxy service, receiving a first debugging instruction of a debugging end to the mobile end page through the Web page, modifying the HTTP request according to the first debugging instruction, receiving a second debugging instruction of the debugging end to the mobile end page, and modifying the response information according to the second debugging instruction.
Optionally, the debugging terminal is a fixed terminal that cannot be accessed by the mobile terminal, and the HTTP proxy service and the Web server service are located on a server or a terminal device that can be accessed by the mobile terminal and the fixed terminal.
Optionally, the HTTP proxy service and the Web server service are implemented by a node.
According to yet another aspect of an embodiment of the present invention, an electronic device is provided.
An electronic device, comprising: one or more processors; the memory is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors realize the page debugging method provided by the invention.
According to yet another aspect of an embodiment of the present invention, a computer-readable medium is provided.
A computer-readable medium, on which a computer program is stored, which, when executed by a processor, implements the page debugging method provided by the present invention.
One embodiment of the above invention has the following advantages or benefits: acquiring an HTTP request sent by a mobile terminal page; receiving a first debugging instruction of a debugging end to a mobile end page, and modifying an HTTP request according to the first debugging instruction; sending the modified HTTP request to a remote server, and acquiring response information of the remote server to the modified HTTP request; receiving a second debugging instruction of the debugging end to the mobile end page, and modifying the response information according to the second debugging instruction; and sending the modified response information to the mobile terminal page. Hardware cost can be saved, and the defect that wifi hot spots are unstable is overcome, so that debugging efficiency is improved, and the method is not limited by a debugging place.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram illustrating the main steps of a page debugging method according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram of a page debugging process according to a second embodiment of the present invention;
FIG. 3 is a schematic diagram of main blocks of a page debugging apparatus according to a third embodiment of the present invention;
FIG. 4 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 5 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
As will be appreciated by one skilled in the art, embodiments of the present invention may be embodied as a system, apparatus, device, method, or computer program product. Accordingly, the present disclosure may be embodied in the form of: entirely hardware, entirely software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
Fig. 1 is a schematic diagram of main steps of a page debugging method according to a first embodiment of the present invention.
As shown in fig. 1, the page debugging method according to the first embodiment of the present invention mainly includes the following steps S101 to S105.
Step S101: and acquiring an HTTP request sent by the mobile terminal page.
The mobile terminal is a mobile device such as a mobile phone.
Step S102: and receiving a first debugging instruction of the debugging end to the mobile end page, and modifying the HTTP request according to the first debugging instruction.
The debug terminal is a fixed terminal that cannot access the mobile terminal, such as a PC (personal computer).
Step S103: and sending the modified HTTP request to a remote server, and acquiring response information of the remote server to the modified HTTP request.
Step S104: and receiving a second debugging instruction of the debugging end to the mobile end page, and modifying the response information according to the second debugging instruction.
Step S105: and sending the modified response information to the mobile terminal page.
The embodiment can perform information interaction with the mobile terminal page and the remote server through the HTTP proxy service, where the information interaction with the mobile terminal page includes: receiving an HTTP request and sending modified response information; the information interaction with the remote server comprises: and sending the modified HTTP request and acquiring the response information.
The method comprises the steps that a Web servo service which is connected with an HTTP proxy service in a network mode is used for providing a Web page, a first debugging instruction of a debugging end to a mobile end page is received through the Web page, and an HTTP request is modified according to the first debugging instruction. And a second debugging instruction of the debugging end to the mobile end page can be received through the Web page, and the response information is modified according to the second debugging instruction.
The HTTP proxy service and the Web server service may be located on a server or a terminal device, such as a mobile terminal, which is accessible by the mobile terminal and the fixed terminal.
In one embodiment, the HTTP proxy service and the Web server service are located on the same server or terminal device.
As another embodiment, the HTTP proxy service and the Web server service are located on different servers or terminal devices.
As still another embodiment, one of the HTTP proxy service and the Web service is located on the server and the other is located on the terminal device.
The HTTP proxy service and the Web server service can be implemented by a node.js program, where nodjs is a JavaScript running environment, and essentially encapsulates a Chrome V8 engine (a JavaScript engine), and node.js optimizes some special cases to provide a substitute API (application program interface), so that the V8 runs better in a non-browser environment. Alternatively, the HTTP proxy service and the Web server service described above may also be implemented by Java programs. The HTTP proxy service and the Web server service are implemented by running the node.js program or the Java program on a server or a terminal device that can be accessed by the mobile terminal and the fixed terminal.
By the embodiment of the invention, the debugging operations such as capturing simulation request response and the like on the webpage in the mobile phone can be realized on the computer under the condition that the mobile phone cannot directly access the computer.
Fig. 2 is a schematic diagram of a page debugging process according to a second embodiment of the present invention.
The flow of fig. 2 illustrates a page debugging method according to an embodiment of the present invention, taking an example that the HTTP proxy service and the Web server service are located on the same server that the mobile terminal and the fixed terminal can access.
In this embodiment, in a scenario where a developing computer and a mobile device cannot directly access each other, for example: the two are located in different local area networks, related security regulations in enterprises prohibit mutual access and other scenes, and the webpage in the mobile phone is debugged at the computer side under the condition that the mobile phone does not directly access a computer.
Specifically, a server that can be accessed by both a mobile phone and a computer can be set in an intranet (intranet), and a set of node. After the mobile phone uses the HTTP service, the HTTP request sent by the Web in the mobile phone and the response information of the remote server corresponding to the HTTP request pass through the server, and the node. The computer accesses the Web page provided by the server through the browser, and the request and response information of the mobile phone can be checked, modified or simulated on the Web page.
As shown in fig. 2, the page debugging process of the present embodiment is specifically as follows. A node.js program is deployed on an intranet server to provide HTTP proxy service and Web server service (S201), it should be noted that a proxy server IP needs to be set in a mobile phone as the server IP, and a port provides a port of the HTTP proxy service for the server; the HTTP proxy service on the server acquires an HTTP request (namely, a webpage request, which is called a request for short) sent by a Web page in the mobile phone and response information (called a response for short) of the remote server, and provides the acquired request and response to the Web servo service (S202); the Web server receives the request and response obtained by the HTTP proxy service, and provides the request and response to the computer side for viewing and/or modification (S203), where the Web page is a Web page provided by the node.
According to fig. 2, a Web page requiring debugging (i.e. a mobile end page requiring debugging) is accessed on a mobile phone. The Web page (Web page) provided by the server through the Web server service can be accessed by using a browser at the computer end, and operations such as viewing, processing and the like can be carried out on request and response information in the Web page.
It should be noted that the above S201, S202, and S203 do not indicate the sequence of step execution, and the step execution sequence in the page debugging process needs to be understood by combining the descriptions in the blocks corresponding to S201, S202, and S203 and the flow directions (indicated by arrows) of the request and the response. It will be understood by those skilled in the art that the HTTP proxy service in the flow shown in fig. 2 does not simultaneously acquire the HTTP request issued by the Web page in the handset and the response information of the remote server, nor simultaneously provide the request and the response to the Web service, and likewise, the Web service does not simultaneously receive the request and the response acquired by the HTTP proxy service, and S202 and S203 are intended to illustrate the functions of the HTTP proxy service and the Web service. As can be known from the flow direction of the request and the response in fig. 2, after the HTTP proxy service acquires the HTTP request sent by the Web page in the mobile phone, the intercepted request is sent to the Web server so as to access the Web page provided by the Web server through the computer browser to perform a debugging operation (for example, to modify the request), and then the modified request is sent back to the HTTP proxy service, the HTTP proxy service sends the modified request to the remote server and receives the response information of the remote server to the request, the HTTP proxy service sends the intercepted (received) response information to the Web server so as to access the Web page provided by the Web server through the computer browser to perform a debugging operation (for example, to modify the response), the Web server returns the modified response to the HTTP proxy service, and the HTTP proxy service returns the modified response to the mobile phone.
The embodiment of the invention solves the problem of debugging Web in the mobile phone at the computer terminal under the scene that the mobile phone and the computer cannot directly visit each other by simultaneously providing HTTP proxy service for the mobile phone and Web servo service for the computer at the intranet server terminal and synchronously requesting and responding data between the two services, completely does not need the computer to transmit wifi hotspots, saves the cost for purchasing wireless network cards possibly generated by transmitting the wifi hotspots, greatly improves the debugging efficiency of the mobile Web, and conforms to the regulation of forbidding the transmission of the wifi hotspots in a specific scene.
Fig. 3 is a schematic diagram of main blocks of a page debugging apparatus according to a third embodiment of the present invention.
As shown in fig. 3, a page debugging apparatus 300 according to a third embodiment of the present invention mainly includes: an interaction module 301 and a debugging module 302.
The interaction module 301 is configured to obtain an HTTP request sent by a mobile end page.
The debugging module 302 is configured to receive a first debugging instruction of a debugging end for a mobile end page, and modify the HTTP request according to the first debugging instruction. The debugging end is a fixed terminal which can not mutually access the mobile end.
The interaction module 301 is further configured to send the modified HTTP request to the remote server, and obtain response information of the remote server to the modified HTTP request.
The debugging module 302 is further configured to receive a second debugging instruction of the debugging end to the mobile end page, and modify the response information according to the second debugging instruction.
The interaction module 301 is further configured to send the modified response information to the mobile terminal page.
The interaction module can be further used for executing information interaction with the mobile terminal page and the remote server through the HTTP proxy service, wherein the information interaction with the mobile terminal page comprises the following steps: receiving an HTTP request and sending modified response information; the information interaction with the remote server comprises: and sending the modified HTTP request and acquiring the response information.
The debugging module 302 may further be configured to provide a Web page through a Web service that establishes a network connection with the HTTP proxy service, receive, through the Web page, a first debugging instruction of the debugging port to the mobile end page, and modify the HTTP request according to the first debugging instruction. And a second debugging instruction of the debugging end to the mobile end page can be received through the Web page, and the response information is modified according to the second debugging instruction.
As an alternative, the HTTP proxy service and the Web server service are located on a server or a terminal device that is accessible by the mobile terminal and the fixed terminal.
In one embodiment, the HTTP proxy service and the Web server service are located on the same server or terminal device.
As another embodiment, the HTTP proxy service and the Web server service are located on different servers or terminal devices.
As still another embodiment, one of the HTTP proxy service and the Web service is located on the server and the other is located on the terminal device.
The HTTP proxy service and the Web server service may be implemented by node.
In addition, the specific implementation contents of the page debugging device in the embodiment of the present invention have been described in detail in the above page debugging method, so that repeated contents are not described again.
Fig. 4 shows an exemplary system architecture 400 to which the page debugging method or the page debugging apparatus of the embodiments of the present invention can be applied.
As shown in fig. 4, the system architecture 400 may include terminal devices 401, 402, 403, a network 404, and a server 405. The network 404 serves as a medium for providing communication links between the terminal devices 401, 402, 403 and the server 405. Network 404 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use terminal devices 401, 402, 403 to interact with a server 405 over a network 404 to receive or send messages or the like. The terminal devices 401, 402, 403 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 401, 402, 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 405 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 401, 402, 403. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be noted that the page debugging method provided by the embodiment of the present invention is generally executed by the server 405 or the terminal devices 401, 402, and 403, and accordingly, the page debugging apparatus is generally disposed in the server 405 or the terminal devices 401, 402, and 403.
It should be understood that the number of terminal devices, networks, and servers in fig. 4 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 5, a block diagram of a computer system 500 suitable for use in implementing a terminal device or server of an embodiment of the present application is shown. The terminal device or the server shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU)501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The above-described functions defined in the system of the present application are executed when the computer program is executed by the Central Processing Unit (CPU) 501.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes an interaction module and a debug module. The names of these modules do not constitute a limitation to the modules themselves in some cases, and for example, the interaction module may also be described as a "module for acquiring HTTP requests issued by a mobile end page".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: acquiring an HTTP request sent by a mobile terminal page; receiving a first debugging instruction of a debugging end to the mobile end page, and modifying the HTTP request according to the first debugging instruction; sending the modified HTTP request to a remote server, and acquiring response information of the remote server to the modified HTTP request; receiving a second debugging instruction of the debugging end to the mobile end page, and modifying the response information according to the second debugging instruction; and sending the modified response information to the mobile terminal page.
According to the technical scheme of the embodiment of the invention, a first debugging instruction of a debugging end to a mobile end page is received, an HTTP request is modified according to the first debugging instruction, the modified HTTP request is sent to a remote server, a second debugging instruction of the debugging end to the mobile end page is received, and the response information is modified according to the second debugging instruction; and sending the modified response information to the mobile terminal page. Hardware cost can be saved, and the defect that wifi hot spots are unstable is overcome, so that debugging efficiency is improved, and the method is not limited by a debugging place.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (10)
1. A page debugging method is characterized by comprising the following steps:
acquiring an HTTP request sent by a mobile terminal page;
receiving a first debugging instruction of a debugging end to the mobile end page, and modifying the HTTP request according to the first debugging instruction;
sending the modified HTTP request to a remote server, and acquiring response information of the remote server to the modified HTTP request;
receiving a second debugging instruction of the debugging end to the mobile end page, and modifying the response information according to the second debugging instruction;
and sending the modified response information to the mobile terminal page.
2. The method according to claim 1, wherein the information interaction with the mobile side page and the remote server is performed through an HTTP proxy service, wherein the information interaction with the mobile side page comprises: receiving the HTTP request and sending the modified response information; the information interaction with the remote server comprises: sending the modified HTTP request and acquiring the response information;
and providing a Web page through a Web servo service which establishes network connection with the HTTP proxy service, receiving a first debugging instruction of a debugging end to the mobile end page through the Web page, modifying the HTTP request according to the first debugging instruction, receiving a second debugging instruction of the debugging end to the mobile end page, and modifying the response information according to the second debugging instruction.
3. The method according to claim 2, wherein the debugging end is a fixed terminal that is not mutually accessible to the mobile end, and the HTTP proxy service and the Web service are located on a server or a terminal device that is accessible to the mobile end and the fixed terminal.
4. The method of claim 2, wherein the HTTP proxy service and the Web server service are implemented by node.
5. A page debugging apparatus, comprising:
the interaction module is used for acquiring an HTTP request sent by a mobile terminal page;
the debugging module is used for receiving a first debugging instruction of a debugging end to the mobile end page and modifying the HTTP request according to the first debugging instruction;
the interaction module is further used for sending the modified HTTP request to a remote server and acquiring response information of the remote server to the modified HTTP request;
the debugging module is also used for receiving a second debugging instruction of the debugging end to the mobile end page and modifying the response information according to the second debugging instruction;
and the interaction module is also used for sending the modified response information to the mobile terminal page.
6. The apparatus of claim 5, wherein the interaction module is further configured to perform information interaction with the mobile end page and the remote server through an HTTP proxy service, and wherein the information interaction with the mobile end page includes: receiving the HTTP request and sending the modified response information; the information interaction with the remote server comprises: sending the modified HTTP request and acquiring the response information;
the debugging module is also used for providing a Web page through a Web servo service which establishes network connection with the HTTP proxy service, receiving a first debugging instruction of a debugging end to the mobile end page through the Web page, modifying the HTTP request according to the first debugging instruction, receiving a second debugging instruction of the debugging end to the mobile end page, and modifying the response information according to the second debugging instruction.
7. The apparatus according to claim 6, wherein the debugging end is a fixed terminal that is not accessible to the mobile end, and the HTTP proxy service and the Web service are located on a server or a terminal device that is accessible to the mobile end and the fixed terminal.
8. The apparatus of claim 6, wherein the HTTP proxy service and the Web server service are implemented by node.
9. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method recited in any of claims 1-4.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910404950.3A CN111953718B (en) | 2019-05-15 | 2019-05-15 | Page debugging method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910404950.3A CN111953718B (en) | 2019-05-15 | 2019-05-15 | Page debugging method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111953718A true CN111953718A (en) | 2020-11-17 |
CN111953718B CN111953718B (en) | 2024-05-24 |
Family
ID=73336427
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910404950.3A Active CN111953718B (en) | 2019-05-15 | 2019-05-15 | Page debugging method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111953718B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112486813A (en) * | 2020-11-25 | 2021-03-12 | 广州品唯软件有限公司 | Debugging method, debugging device and computer readable storage medium |
CN114490383A (en) * | 2022-01-25 | 2022-05-13 | 阿里巴巴(中国)有限公司 | Remote debugging system, remote debugging method, computing device and readable medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105430108A (en) * | 2014-08-25 | 2016-03-23 | 腾讯科技(深圳)有限公司 | Test environment accessing method and proxy server |
US9645910B1 (en) * | 2015-03-12 | 2017-05-09 | Amazon Technologies, Inc. | Cross platform mobile HTML debugging |
CN106790683A (en) * | 2017-02-10 | 2017-05-31 | 合网络技术(北京)有限公司 | Network data display methods and device based on mobile terminal |
CN107133180A (en) * | 2017-06-07 | 2017-09-05 | 腾讯科技(深圳)有限公司 | Method of testing, test device and the storage medium of dynamic page |
CN107809417A (en) * | 2017-09-22 | 2018-03-16 | 柚子(北京)移动技术有限公司 | Mobile solution exploitation adjustment method based on WLAN |
CN108111369A (en) * | 2017-12-22 | 2018-06-01 | 北京奇虎科技有限公司 | The test method and device of a kind of webpage performance of mobile terminal |
CN109002366A (en) * | 2018-07-26 | 2018-12-14 | 广东蔚海数问大数据科技有限公司 | A kind of remote debugging method and device of mobile terminal webpage |
-
2019
- 2019-05-15 CN CN201910404950.3A patent/CN111953718B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105430108A (en) * | 2014-08-25 | 2016-03-23 | 腾讯科技(深圳)有限公司 | Test environment accessing method and proxy server |
US9645910B1 (en) * | 2015-03-12 | 2017-05-09 | Amazon Technologies, Inc. | Cross platform mobile HTML debugging |
CN106790683A (en) * | 2017-02-10 | 2017-05-31 | 合网络技术(北京)有限公司 | Network data display methods and device based on mobile terminal |
CN107133180A (en) * | 2017-06-07 | 2017-09-05 | 腾讯科技(深圳)有限公司 | Method of testing, test device and the storage medium of dynamic page |
CN107809417A (en) * | 2017-09-22 | 2018-03-16 | 柚子(北京)移动技术有限公司 | Mobile solution exploitation adjustment method based on WLAN |
CN108111369A (en) * | 2017-12-22 | 2018-06-01 | 北京奇虎科技有限公司 | The test method and device of a kind of webpage performance of mobile terminal |
CN109002366A (en) * | 2018-07-26 | 2018-12-14 | 广东蔚海数问大数据科技有限公司 | A kind of remote debugging method and device of mobile terminal webpage |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112486813A (en) * | 2020-11-25 | 2021-03-12 | 广州品唯软件有限公司 | Debugging method, debugging device and computer readable storage medium |
CN114490383A (en) * | 2022-01-25 | 2022-05-13 | 阿里巴巴(中国)有限公司 | Remote debugging system, remote debugging method, computing device and readable medium |
Also Published As
Publication number | Publication date |
---|---|
CN111953718B (en) | 2024-05-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11563674B2 (en) | Content based routing method and apparatus | |
CN108989362A (en) | A kind for the treatment of method and apparatus of static resource | |
CN107181779B (en) | Method, device and system for processing access request | |
CN112202744B (en) | Multi-system data communication method and device | |
CN109992406A (en) | The method and client that picture requesting method, response picture are requested | |
CN109218041B (en) | Request processing method and device for server system | |
CN105554085B (en) | A kind of dynamic timeout treatment method and apparatus based on server connection | |
US20190370293A1 (en) | Method and apparatus for processing information | |
CN111953718B (en) | Page debugging method and device | |
CN112015383A (en) | Login method and device | |
CN112131095A (en) | Pressure testing method and device | |
CN112558933B (en) | Component rendering method and device, readable medium and electronic equipment | |
CN112995005B (en) | Virtual network data exchange method and device | |
CN114915565B (en) | Network debugging method and system | |
CN115037572B (en) | Application request identification method and device | |
CN113761433B (en) | Service processing method and device | |
US11057489B2 (en) | Content deployment method and delivery controller | |
CN109005250B (en) | Method and device for accessing server | |
CN110909269B (en) | Log reporting method and device | |
CN113779122A (en) | Method and apparatus for exporting data | |
CN113760487A (en) | Service processing method and device | |
CN113449215B (en) | Picture loading method and device | |
CN113064678B (en) | Cache configuration method and device | |
CN114650271B (en) | Global load DNS neighbor site learning method and device | |
CN113687877B (en) | Method, device and system for processing data |
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 |