Method for debugging quick application, device for debugging quick application and electronic equipment
By receiving debugging instructions through the debugging kernel module, obtaining and assembling the debugging information of the quick application platform, it solves the problems of performance testing and real-time viewing in quick application debugging, and improves debugging efficiency and accuracy.
Patent Information
- Application Number
- CN201911120455.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-11-15
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2039-11-15
AI Technical Summary
Developers cannot test the performance of the quick application platform when debugging quick applications, and cannot view debugging results in real time, resulting in low debugging efficiency.
By using the debugging kernel module as a bridge, it receives the debugging instructions from the debugging front-end, obtains the debugging information of the fast application running on the fast application platform, and assembles it into debugging data and sends it to the debugging front-end to realize real-time debugging of the fast application.
This enables the debugging front-end to obtain real-time data during the debugging process of quick application operation, improve debugging efficiency, and ensure that the debugging effect is consistent with the running effect.
Smart Images

Figure CN110908904B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computers, and in particular to a method for debugging a quick application, a device for debugging a quick application, and an electronic device. Background Art
[0002] In the related technology, a quick app is a program based on a mobile phone hardware platform that can be run on multiple terminals such as Android, IOS, and WebView, written by a set of JS codes by developers. Developers can develop the program in a form similar to traditional HTML. From a data perspective, the program can be divided into a component tree (DOM), style (CSS), and logic (JS code); from a composition perspective, it can be divided into a configuration file (manifest.json), a global file (app.js), and a page file (page). After packaging, an automatic compilation project (rpk) file will be formed. The packaged file is the application program of the quick app.
[0003] Currently, when developers are debugging quick apps, they cannot test the performance of the quick app platform or view the debugging results in real time. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the present disclosure provides a method for debugging a quick application, a device for debugging a quick application, and an electronic device.
[0005] According to a first aspect of an embodiment of the present disclosure, a method for debugging a quick application is provided, which is applied to debugging a kernel module. The method for debugging a quick application includes: receiving a debugging instruction for debugging a quick application sent by a debugging front end; obtaining debugging information of the quick application running on a quick application platform according to the debugging instruction; assembling the obtained debugging information into debugging data for debugging the quick application; and sending the debugging data to the debugging front end for debugging the quick application.
[0006] In one embodiment, assembling the debugging information into debugging data for debugging the quick application includes: assembling the debugging information into debugging data for debugging the quick application based on a network protocol.
[0007] In one embodiment, the debugging information includes at least one of: operation information of the quick application platform, view rendering information of the quick application, or page structure information of the quick application.
[0008] In one embodiment, obtaining running information of a quick application running on a quick application platform includes: obtaining running information of a quick application running on a quick application platform in a bridging manner through a V8 bridge module of a debugging kernel module; assembling the debugging information into debugging data for debugging the quick application, including: assembling the running information of the quick application platform into debugging data for debugging the quick application.
[0009] In one embodiment, obtaining view rendering information of a quick application running on a quick application platform includes: obtaining view rendering information of a quick application running on a quick application platform in a bridging manner through a platform bridge module of a debugging kernel module; assembling the debugging information into debugging data for debugging the quick application, including: assembling the view rendering information into debugging data for debugging the quick application.
[0010] In one embodiment, obtaining page structure information of a quick application running on a quick application platform includes: obtaining page structure information of a quick application running on a quick application platform through a page structure management module of a debugging kernel module; assembling the debugging information into debugging data for debugging the quick application includes: assembling the page structure information into debugging data for debugging the quick application.
[0011] In one embodiment, assembling the page structure information into debugging data for debugging the quick application includes: locking the acquired page structure information, and then assembling the page structure information into debugging data for debugging the quick application.
[0012] In one embodiment, receiving a debugging instruction for debugging a quick application sent by a debugging front end includes: establishing a connection with the debugging front end through an interactive protocol; and receiving a debugging instruction for debugging a quick application sent by the debugging front end based on the connection.
[0013] According to a second aspect of an embodiment of the present disclosure, a device for debugging a quick application is provided, which is applied to debugging a kernel module. The device for debugging a quick application includes: a connection module, which is used to receive a debugging instruction for debugging a quick application sent by a debugging front end; an acquisition module, which is used to obtain debugging information of the quick application running on a quick application platform according to the debugging instruction; an assembly module, which is used to assemble the debugging information into debugging data for debugging the quick application; and a sending module, which is used to send the debugging information to the debugging front end, and is used to assemble the application information into debugging information.
[0014] In one embodiment, the debugging information includes at least one of: operation information of the quick application platform, view rendering information of the quick application, or page structure information of the quick application.
[0015] In one embodiment, the acquisition module obtains the running information of the quick application running on the quick application platform in the following manner: by debugging the V8 bridge module of the kernel module, the running information of the quick application running on the quick application platform is obtained in a bridging manner; the assembly module assembles the debugging information into debugging data for debugging the quick application in the following manner: assembling the running information of the quick application platform into debugging data for debugging the quick application.
[0016] In one embodiment, the acquisition module obtains the view rendering information of the quick application running on the quick application platform in the following manner: through the platform bridge module of the debugging kernel module, the view rendering information of the quick application running on the quick application platform is obtained in a bridging manner; the assembly module assembles the debugging information into debugging data for debugging the quick application in the following manner: assembling the view rendering information into debugging data for debugging the quick application.
[0017] In one embodiment, the acquisition module obtains the page structure information of the quick application running on the quick application platform in the following manner: by debugging the page structure management module of the kernel module, the page structure information of the quick application running on the quick application platform is obtained; the assembly module assembles the debugging information into debugging data for debugging the quick application in the following manner: assembling the page structure information into debugging information for debugging the quick application.
[0018] In one embodiment, the assembling module assembles the page structure information into debugging data for debugging the quick application in the following manner: after locking the acquired page structure information, the page structure information is assembled into debugging data for debugging the quick application.
[0019] In one embodiment, the receiving module receives the debugging instruction for debugging the quick application sent by the debugging front end in the following manner: establishing a connection with the debugging front end through an interactive protocol; and receiving the debugging instruction for debugging the quick application sent by the debugging front end based on the connection.
[0020] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, wherein the electronic device includes: a memory for storing instructions; and a processor for calling any one of the above methods for debugging a quick application.
[0021] According to a fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided, characterized in that the non-temporary computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, any one of the above-mentioned methods for debugging a quick application is executed.
[0022] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: by using the debugging kernel as an interactive bridge between the quick application and the debugging front end, the debugging front end can be debugged during the debugging of the quick application, so that the debugging effect of the quick application is consistent with the running effect after debugging.
[0023] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0025] Figure 1 The figure is a flowchart of a method for debugging a quick application according to an exemplary embodiment.
[0026] Figure 2 The present invention is a system interaction diagram showing a method for debugging a quick application according to an exemplary embodiment.
[0027] Figure 3 The invention is a block diagram showing a device for debugging a quick application according to an exemplary embodiment.
[0028] Figure 4 The invention is a block diagram of another system for debugging a quick application according to an exemplary embodiment.
[0029] Figure 5 The invention is a block diagram showing a device for debugging a quick application according to an exemplary embodiment.
[0030] Figure 6 The invention is a block diagram showing a device for debugging a quick application according to an exemplary embodiment. DETAILED DESCRIPTION
[0031] Here, exemplary embodiments will be described in detail with reference to the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are only examples of devices and methods consistent with some aspects of the present invention as detailed in the attached claims.
[0032] Currently, the way developers debug quick apps is to simulate the quick app on the terminal with the help of H5 pages, then debug the simulated page with the debugging front end, and then transfer the debugging data to the quick app to check the debugging effect. This method has low debugging efficiency and cannot debug the data when the quick app is running. The terminal may include: laptops, desktop computers, which are not limited in this disclosure.
[0033] The method for debugging quick applications provided by the embodiments of the present disclosure is based on the data of quick applications when they are running on the quick application platform. Through the debugging kernel, the debugging front end can access the quick application and obtain the data of the quick application in operation, thereby debugging the quick application.
[0034] Figure 1 Shown is a flowchart of a method for debugging a quick application according to an exemplary embodiment of the present disclosure.
[0035] like Figure 1 As shown, a method 10 for debugging a quick application according to an exemplary embodiment of the present disclosure is applied to a debugging kernel module. In the present disclosure, the debugging kernel module and the quick application platform both belong to the back end of the quick application and run in a mobile terminal, such as a mobile phone, a tablet or other mobile terminal. The debugging front end belongs to the front end of the quick application and runs on the developer's desktop terminal. The debugging kernel is in the position of a bridge in debugging, between the debugging front end and the quick application platform, and carries the function of quick application debugging. The method 10 for debugging a quick application includes the following working process.
[0036] In step S11, a debugging instruction for debugging a quick application sent by a debugging front end is received.
[0037] In the disclosed embodiment, the debugging front end sends a debugging instruction for debugging the quick application to the debugging kernel module according to the debugging requirements. The debugging kernel module starts the function of debugging the quick application according to the received debugging instruction, so as to obtain the debugging information corresponding to the debugging instruction, which helps the debugging front end to effectively debug the quick application.
[0038] In one embodiment, the debugging kernel module establishes a connection with the debugging front end through an interactive protocol to facilitate the exchange of data between each other. The debugging kernel module receives a debugging request sent by the debugging front end according to the connection established between the debugging kernel module and the debugging front end. The interactive protocol may include: Hypertext Transfer Protocol (HTTP), Transmission Control Protocol (TCP), etc., which are not limited in the present disclosure.
[0039] In step S12, according to the debugging instruction, debugging information of the quick application running on the quick application platform is obtained.
[0040] In an embodiment of the present disclosure, the content of the debugging instruction may include debugging information that the debugging front end needs to obtain or debugging information that the debugging front end needs to obtain and the relevant format of the debugging information. The debugging kernel obtains debugging information of the quick application running on the quick application platform according to the debugging instruction of the debugging front end. Based on the operation of the quick application, the debugging information of the quick application is obtained, which can effectively detect the performance and running status of each part of the quick application, thereby effectively debugging the quick application, and helping the released version of the quick application after debugging to have the same effect as the debug version of the quick application. In one embodiment, the running changes of the quick application on the quick application platform are synchronized to the debugging kernel module in real time, so that the debugging performed by the debugging front end based on the obtained debugging data is more accurate and the debugging results are more effective.
[0041] In an optional embodiment, based on the running state of the quick application, the debugging information retrieved by the debugging front end through the debugging instruction may include at least one of the following information: the running information of the quick application platform, the view rendering information of the quick application, and the page structure information of the quick application. The running information of the quick application platform may include: the time, memory, thread and other information of the running of the quick application platform, and then the running information is obtained. The view rendering information of the quick application may include: the rendering information of the quick application at runtime, that is, the page effect displayed by the quick application. The page structure information of the quick application may include: web page text objects (Document Object Model, DOM), web page cascading styles (Cascading Style Sheets, CSS) and other information.
[0042] In an optional embodiment, the quick application can be developed using the JavaScript (JS) language and run on the engine. According to the debugging instruction sent by the debugging front end to obtain the running information of the quick application platform, the debugging kernel module uses the JS engine bridge module to obtain the running information of the quick application running on the quick application platform through the JS local interface of the quick application running platform in a bridging manner. Obtaining the information when the quick application is running helps the debugging front end to discover problems that occur during the operation of the quick application, which facilitates developers to debug the running problems and improve debugging efficiency. Among them, the JS engine can be a V8 engine, and the JS local interface can be a J2V8 interface. In an implementation scenario, the debugging front end needs to debug the JS code information of the quick application running, and the debugging kernel module obtains the JS code information through the JS engine bridge module according to the debugging instruction sent by the debugging front end to obtain the running information of the quick application platform.
[0043] In another optional embodiment, according to the debugging instruction for obtaining the view rendering information of the quick application sent by the debugging front end, the debugging kernel module uses the platform bridge module to obtain the view rendering information of the quick application running on the quick application platform in a bridging manner. By retrieving the view rendering information of the quick application when it is running, it is helpful to obtain the real effect displayed by the quick application when it is running, which is convenient for rapid comparison with the expected effect, thereby improving the debugging efficiency. In one implementation scenario, the debugging front end needs to debug the view rendering information of the quick application, and then sends a debugging instruction for debugging the view rendering information of the quick application to the debugging kernel module. The debugging kernel module obtains the view page rendering information of the current running quick application through the platform bridge module according to the debugging instruction.
[0044] In another optional embodiment, according to the debugging instruction for obtaining the page structure information of the quick application sent by the debugging front end, the debugging kernel module uses the page structure management module to obtain the page structure information of the quick application running on the quick application platform. By retrieving the page structure information of the quick application when it is running, it is helpful for developers to observe the page structure changes of the quick application when it is running, and debug the features or functions that need to be implemented when the quick application is running on the quick application platform according to the preset effect. In an implementation scenario, the debugging front end needs to debug the page structure information of the quick application, and then sends a debugging instruction for debugging the page structure information of the quick application to the debugging kernel module. The debugging kernel module obtains the page structure information of the current running quick application through the page structure management module according to the debugging instruction.
[0045] In step S13, the debugging information is assembled into debugging data for debugging the quick application.
[0046] In the disclosed embodiment, the debugging kernel module assembles the acquired debugging information so that the assembled debugging data is suitable for the debugging front end, so that the debugging front end can perform debugging according to the acquired debugging data.
[0047] In an optional embodiment, the obtained debugging information is assembled according to the network protocol predefined by the debugging kernel module, so that the assembled debugging data is suitable for the debugging front end. The network protocol may include: CDP (device discovery) protocol, TCP / IP (communication transmission) protocol and other protocols. For example: the debugging front end needs to debug the view rendering information of the quick application, but the debugging format is a picture, then the debugging kernel module obtains the view rendering information of the quick application according to the debugging instruction, and assembles the obtained debugging rendering information into a screenshot of the quick application, so that the debugging front end can debug according to the screenshot.
[0048] In an optional embodiment, the debugging kernel module obtains page structure information according to the debugging instruction, locks the obtained page information, and then assembles the page structure information into debugging data for debugging the quick application, so as to avoid the loss of part of the interactive data of the quick application when the debugging front end performs operations such as querying and modifying the page structure information of the quick application, resulting in functional abnormality.
[0049] In step S14, the debugging data is sent to the debugging front end for debugging the quick application.
[0050] In the disclosed embodiment, the debugging kernel module sends the assembled debugging data to the debugging front end, so that the debugging front end performs debugging according to the acquired debugging data, thereby completing the debugging of the quick application by the debugging front end.
[0051] In an optional embodiment, the debugging front end copies the page structure information of the quick application in advance, obtains the replica structure information that is consistent with the page structure information of the quick application for maintenance. According to the debugging instruction for debugging the page structure information of the quick application, it is sent to the debugging front end through the debugging kernel module, and the debugging front end debugs the replica structure information according to the page structure information of the quick application, so that when debugging the page structure information of the quick application, the normal operation of the quick application is not affected, thereby saving debugging time and debugging costs.
[0052] Through the above embodiments, the debugging kernel module obtains the debugging information of the quick application running on the quick application platform according to the debugging instructions of the debugging front end, and assembles the debugging information into debugging data suitable for the debugging front end, so that the debugging front end can directly debug the quick application. During the debugging process, the debugging front end, the quick application platform and the quick application all participate in the debugging of the quick application, making the debugging content more comprehensive and helping the release mode after debugging to be consistent with the debugging mode effect.
[0053] In an optional embodiment, the quick application includes a debugging management module for managing and controlling the debugging kernel module. When debugging the quick application, the debugging function of the debugging kernel module is started through the debugging management module, and the quick application is debugged using the above method for debugging the quick application.
[0054] Based on an inventive concept, the present disclosure also provides a system interaction diagram of an exemplary method for debugging a quick application.
[0055] Figure 2 FIG20 shows the exemplary method and system interaction diagram of debugging quick applications. Figure 2 As shown, the method system interaction 20 for debugging quick applications includes the following steps.
[0056] In step S21, the platform obtains proxy server information.
[0057] In the disclosed embodiment, after the terminal completes the application program compilation of the quick application, the browser of the terminal is used as the proxy server of the debugging front end. When the quick application is started based on the quick application platform, the proxy server information is sent to the quick application platform.
[0058] In step S22, the quick application platform is initialized.
[0059] In the disclosed embodiment, while the quick application platform obtains the proxy server information, the quick application platform is initialized and sets the current quick application's operating environment to a default state.
[0060] In step S23, the debugging kernel module is started.
[0061] In the disclosed embodiment, after the quick application is started, the debugging kernel module is started through the debugging management module according to the user's debugging request, so as to establish a connection between the debugging kernel module and the debugging front end and send the quick application information to the debugging front end.
[0062] In an optional embodiment, when the quick application is not debugged, an empty debugging kernel module is started through the debugging management module for initialization, and the interaction information is not processed, so that the quick application can run normally.
[0063] In step S231, the JS thread is started.
[0064] In the disclosed embodiment, when a quick application is started based on a quick application platform, a JS thread of the quick application when it is running on the quick application platform is started and initialized, so that the quick application can run on the quick application platform.
[0065] In step S24, the debug kernel module is initialized.
[0066] In the disclosed embodiment, after the debugging kernel module is started, it initializes itself so that the current state of the debugging kernel module is suitable for the debugging front end to debug the quick application at runtime.
[0067] In step S241, the debug kernel is registered.
[0068] In the disclosed embodiment, after the debugging kernel module is initialized, it sends its registration information to the quick application platform for registration, so that the quick application can manage the debugging kernel module through the debugging management module inside the quick application according to the obtained registration information of the debugging kernel. When debugging is convenient, the debugging front end can interact with the quick application through the debugging kernel module and obtain the debugging information of the quick application.
[0069] In step S25, the quick application platform sends the JS thread information to the debugging kernel.
[0070] In the disclosed embodiment, after the JS thread is initialized, the debugging kernel module obtains the JS thread information of the quick application running on the quick application platform, so that the debugging front end can debug the JS thread.
[0071] In step S26, the JS engine bridge module is initialized.
[0072] In the disclosed embodiment, after the debugging kernel module obtains the JS thread information of the quick application, the debugging kernel module initializes the JS engine bridge module and initializes the debugging interface of the JS engine such as the troubleshooting interface or configuration interface of the JS engine, so as to prepare for debugging the JS thread information of the quick application in the debugging front end.
[0073] In step S242, the debugging kernel information is provided to the proxy server.
[0074] In the disclosed embodiment, the debugging kernel module initializes the debugging framework after asynchronously waiting for the JS engine bridge module to be initialized. The debugging framework is, for example, the Stetho framework. The debugging kernel module starts the network server module, listens to the corresponding port of the quick application, and sends the network server address of the debugging kernel module to the debugging front end through the proxy server, so as to facilitate the establishment of a connection between the debugging front end and the debugging kernel. The network server is, for example, an Http server.
[0075] In step S27, the debugging front end is started.
[0076] In the disclosed embodiment, the proxy server starts the debugging front end through the debugging kernel module according to the debugging request received by the quick application, and accesses the network server module of the debugging kernel, so that a connection is established between the debugging front end and the debugging kernel module, so that the debugging kernel can retrieve the corresponding debugging information according to the debugging instructions of the debugging front end.
[0077] In step S271, a debugging preparation signal is sent.
[0078] In the disclosed embodiment, after the debugging front end establishes a connection with the debugging kernel, the debugging front end sends a debugging ready signal to the debugging kernel through the corresponding network protocol, which is used to confirm the debugging to the debugging kernel module, so that the debugging kernel module can obtain debugging information according to the debugging instructions sent by the debugging front end.
[0079] In step S272, the page structure management module is initialized.
[0080] In the disclosed embodiment, the debugging kernel module initializes the page structure management module according to the debugging preparation signal sent by the debugging front end, so that the debugging kernel module can obtain the page structure information of the quick application when running according to the debugging instruction sent by the debugging front end.
[0081] In one embodiment, while the page structure management module is initialized, other debugging modules for debugging functions in the debugging kernel module are also debugged accordingly, so that the debugging front end can smoothly debug the quick application through the debugging kernel.
[0082] Through the above embodiments, when the quick application is running on the quick application platform, the debugging front end debugs the quick application through the debugging kernel module, so that the debugging data obtained by the debugging front end through the debugging kernel module are all from the data of the quick application running. When debugging the quick application, every change of the quick application at runtime is synchronized to the debugging kernel module according to the monitoring of the network server module, and the debugging kernel feeds back the running changes of the quick application to the debugging front end, so that the debugging front end can make real-time adjustments according to the running status of the quick application and quickly achieve the expected effect. Ensure that the debugging mode and release mode of the quick application have the same effect.
[0083] Figure 3 FIG. 1 is a block diagram of a device 100 for debugging a quick application according to an exemplary embodiment. Figure 3 , the device comprises:
[0084] The receiving module 110 is used to receive a debugging instruction for debugging a quick application sent by a debugging front end.
[0085] The acquisition module 120 is used to acquire the debugging information of the quick application running on the quick application platform according to the debugging instruction;
[0086] The assembling module 130 is used to assemble the debugging information into debugging data for debugging the quick application.
[0087] The sending module 140 is used to send the debugging information to the debugging front end, which is used to assemble the application information into the debugging information.
[0088] In an optional embodiment, the assembling module 130 assembles the debugging information into debugging data for debugging the quick application in the following manner: assembling the debugging information into debugging data for debugging the quick application based on a network protocol.
[0089] In an optional embodiment, the debugging information includes: at least one of: operation information of the quick application platform, view rendering information of the quick application, or page structure information of the quick application.
[0090] In an optional embodiment, the acquisition module 120 acquires the running information of the quick application running on the quick application platform in the following manner: by debugging the V8 bridge module of the kernel module, the running information of the quick application running on the quick application platform is acquired in a bridge manner. The assembly module 130 assembles the debugging information into debugging data for debugging the quick application in the following manner: assembling the running information of the quick application platform into debugging data for debugging the quick application.
[0091] In an optional embodiment, the acquisition module 120 acquires the view rendering information of the quick application running on the quick application platform in the following manner: the view rendering information of the quick application running on the quick application platform is acquired in a bridging manner through the platform bridge module of the debugging kernel module. The assembly module 130 assembles the debugging information into debugging data for debugging the quick application in the following manner: the view rendering information is assembled into debugging data for debugging the quick application.
[0092] In an optional embodiment, the acquisition module 120 acquires the page structure information of the quick application running on the quick application platform in the following manner: the page structure information of the quick application running on the quick application platform is acquired by debugging the page structure management module of the kernel module. The assembly module 130 assembles the debugging information into debugging data for debugging the quick application in the following manner: the page structure information is assembled into debugging information for debugging the quick application.
[0093] In an optional embodiment, the assembling module 130 assembles the page structure information into debugging data for debugging the quick application in the following manner: after locking the acquired page structure information, the page structure information is assembled into debugging data for debugging the quick application.
[0094] In an optional embodiment, the receiving module 110 receives the debugging instruction for debugging the quick application sent by the debugging front end in the following manner: establishing a connection with the debugging front end through an interactive protocol; and receiving the debugging instruction for debugging the quick application sent by the debugging front end based on the connection.
[0095] Based on an inventive concept, the present disclosure also provides another exemplary block diagram of a system 200 for debugging a quick application. Figure 4 , the system comprises:
[0096] Quick application platform 210, debugging kernel 220, debugging front end 230 and PC-side proxy server 240, wherein the quick application 210 includes: debugging management module 211; the debugging kernel 220 includes: platform bridge module 221, V8 bridge module 222, CDP protocol processing module 223, httpserver (network server) 224 and DOM tree management module 225.
[0097] The quick application platform 210 is used for running quick applications.
[0098] The debugging management module 211 is used for registering and managing the debugging kernel. When the debugging kernel is not started, it will initialize an empty debugging module to ensure that the program can be executed normally.
[0099] The platform bridge module 221 is used as a bridge for debugging the kernel, responsible for communication with the platform, and initializing other debugging modules.
[0100] The V8 bridge module 222 is used to initialize the debugging interface of V8.
[0101] The CDP protocol processing module 223 is used as a communication protocol processing module of the debugging front end.
[0102] httpserver224 is used as the Web server of the debugging kernel to handle requests from the debugger front end.
[0103] The DOM tree management module 225 is responsible for the construction and synchronization of the debugging end DOM tree.
[0104] The PC-side proxy server 240 is used to record the address of the debugging kernel and start the debugging front end.
[0105] Figure 5 1 is a block diagram of an apparatus 300 for debugging a quick application according to an exemplary embodiment. For example, the apparatus 300 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0106] Reference Figure 5 , the device 300 may include one or more of the following components: a processing component 302 , a memory 304 , a power component 306 , a multimedia component 308 , an audio component 310 , an input / output (I / O) interface 312 , a sensor component 314 , and a communication component 316 .
[0107] The processing component 302 generally controls the overall operation of the device 300, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 302 may include one or more processors 320 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 302 may include one or more modules to facilitate the interaction between the processing component 302 and other components. For example, the processing component 302 may include a multimedia module to facilitate the interaction between the multimedia component 308 and the processing component 302.
[0108] The memory 304 is configured to store various types of data to support operations on the device 300. Examples of such data include instructions for any application or method operating on the device 300, contact data, phone book data, messages, pictures, videos, etc. The memory 304 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0109] The power component 306 provides power to the various components of the device 300. The power component 306 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 300.
[0110] The multimedia component 308 includes a screen that provides an output interface between the device 300 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 308 includes a front camera and / or a rear camera. When the device 300 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0111] The audio component 310 is configured to output and / or input audio signals. For example, the audio component 310 includes a microphone (MIC), and when the device 300 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 304 or sent via the communication component 316. In some embodiments, the audio component 310 also includes a speaker for outputting audio signals.
[0112] I / O interface 312 provides an interface between processing component 302 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0113] The sensor assembly 314 includes one or more sensors for providing various aspects of status assessment for the device 300. For example, the sensor assembly 314 can detect the open / closed state of the device 300, the relative positioning of components, such as the display and keypad of the device 300, the sensor assembly 314 can also detect the position change of the device 300 or a component of the device 300, the presence or absence of user contact with the device 300, the orientation or acceleration / deceleration of the device 300, and the temperature change of the device 300. The sensor assembly 314 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 314 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 314 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0114] The communication component 316 is configured to facilitate wired or wireless communication between the device 300 and other devices. The device 300 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 316 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 316 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0115] In an exemplary embodiment, the apparatus 300 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.
[0116] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 304 including instructions, and the instructions can be executed by the processor 320 of the device 300 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0117] A non-temporary computer-readable storage medium, when instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to execute a method for debugging a quick application, the method including the method for debugging a quick application involved in any of the above disclosed embodiments.
[0118] Figure 6 4 is a block diagram of a device 400 for debugging a quick application according to an exemplary embodiment. For example, the device 400 may be provided as a server. Figure 6 , the apparatus 400 includes a processing component 422, which further includes one or more processors, and a memory resource represented by a memory 432 for storing instructions executable by the processing component 422, such as an application. The application stored in the memory 432 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 422 is configured to execute instructions to perform the method for debugging a quick application involved in any of the above-mentioned methods disclosed in the embodiments.
[0119] The device 400 may also include a power supply component 426 configured to perform power management of the device 400, a wired or wireless network interface 450 configured to connect the device 400 to a network, and an input / output (I / O) interface 458. The device 400 may operate based on an operating system stored in the memory 432, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or the like.
[0120] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
[0121] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A method for debugging a quick application. It is characterized in that The method for debugging a quick application includes: Receive debugging instructions for debugging quick applications sent by the debugging front end; According to the debugging instruction, obtaining debugging information of the quick application running on the quick application platform; Assembling the debugging information into debugging data for debugging the quick application; Sending the debugging data to the debugging front end for debugging the quick application; wherein, establishing a connection with the debugging front end through an interactive protocol; Based on the connection, receiving a debugging instruction for debugging the quick application sent by the debugging front end; The assembling the debugging information into debugging data for debugging the quick application includes: Based on a network protocol, assembling the debugging information into debugging data for debugging the quick application; The debugging information includes: at least one of: operation information of the quick application platform, view rendering information of the quick application, or page structure information of the quick application; Obtaining the page structure information of the quick application running on the quick application platform; The debugging information is assembled into debugging data for debugging the quick application, including: locking the acquired page structure information, and then assembling the page structure information into debugging data for debugging the quick application.
2. The method for debugging a quick application according to claim 1, It is characterized in that Acquiring the running information of the quick application running on the quick application platform includes: acquiring the running information of the quick application running on the quick application platform in a bridging manner; The assembling of the debugging information into debugging data for debugging the quick application includes: assembling the running information of the quick application platform into debugging data for debugging the quick application.
3. The method for debugging a quick application according to claim 1, It is characterized in that Acquiring the view rendering information of the quick application running on the quick application platform includes: acquiring the view rendering information of the quick application running on the quick application platform in a bridging manner; The assembling of the debugging information into debugging data for debugging the quick application includes: assembling the view rendering information into debugging data for debugging the quick application.
4. A device for debugging a quick application, It is characterized in that The device for debugging a quick application comprises: A receiving module, used to receive a debugging instruction for debugging a quick application sent by a debugging front end; An acquisition module, configured to acquire debugging information of the quick application running on the quick application platform according to the debugging instruction; An assembling module, used for assembling the debugging information into debugging data for debugging the quick application; A sending module, used to send the debugging information to the debugging front end for debugging the quick application; The receiving module receives the debugging instruction for debugging the quick application sent by the debugging front end in the following manner: Establishing a connection with the debugging front end through an interactive protocol; Based on the connection, receiving a debugging instruction for debugging the quick application sent by the debugging front end; The assembling module assembles the debugging information into debugging data for debugging the quick application in the following manner: Based on a network protocol, assembling the debugging information into debugging data for debugging the quick application; The debugging information includes: at least one of: operation information of the quick application platform, view rendering information of the quick application, or page structure information of the quick application; The acquisition module acquires the page structure information of the quick application running on the quick application platform in the following manner: Obtaining the page structure information of the quick application running on the quick application platform; The assembling module assembles the debugging information into debugging data for debugging the quick application in the following manner: After the acquired page structure information is locked, the page structure information is assembled into debugging data for debugging the quick application.
5. The device for debugging a quick application according to claim 4, It is characterized in that The acquisition module acquires the running information of the quick application running on the quick application platform in the following manner: Acquire the running information of the quick application running on the quick application platform in a bridging manner; The assembling module assembles the debugging information into debugging data for debugging the quick application in the following manner: The running information of the quick application platform is assembled into debugging data for debugging the quick application.
6. The device for debugging a quick application according to claim 4, It is characterized in that The acquisition module acquires the view rendering information of the quick application running on the quick application platform in the following manner: Obtaining view rendering information of the quick application running on the quick application platform in a bridging manner; The assembling module assembles the debugging information into debugging data for debugging the quick application in the following manner: The view rendering information is assembled into debugging data for debugging the quick application.
7. An electronic device, in, The electronic device comprises: a memory for storing instructions; and A processor, configured to call the instructions stored in the memory to execute the method for debugging a quick application as described in any one of claims 1 to 3.
8. A non-transitory computer-readable storage medium, It is characterized in that The non-transitory computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the method for debugging a quick application described in any one of claims 1 to 3 is executed.
Citation Information
Patent Citations
Remote debugging method of small program, related equipment and system
CN109117361A
Asynchrony Debugging Using Web Services Interface
US20110004790A1
Suspending and Resuming a Graphics Application Executing on a Target Device for Debugging
US20130091494A1
