CN114328197A - Applet plug-in debugging method, system and computer readable storage medium - Google Patents

Applet plug-in debugging method, system and computer readable storage medium Download PDF

Info

Publication number
CN114328197A
CN114328197A CN202111553679.3A CN202111553679A CN114328197A CN 114328197 A CN114328197 A CN 114328197A CN 202111553679 A CN202111553679 A CN 202111553679A CN 114328197 A CN114328197 A CN 114328197A
Authority
CN
China
Prior art keywords
debugging
plug
applet
target
application program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111553679.3A
Other languages
Chinese (zh)
Inventor
张聪萍
解楠
沈玺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Unionpay Co Ltd
Original Assignee
China Unionpay Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Unionpay Co Ltd filed Critical China Unionpay Co Ltd
Priority to CN202111553679.3A priority Critical patent/CN114328197A/en
Publication of CN114328197A publication Critical patent/CN114328197A/en
Priority to PCT/CN2022/117422 priority patent/WO2023109202A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software

Abstract

The invention provides a method, a system and a device for debugging an applet plug-in and a computer readable storage medium, wherein the method comprises the following steps: when a target applet calls an applet plug-in to be debugged, the application program sends a first plug-in debugging protocol package to a debugging tool main process, wherein the target applet runs in an applet container which starts a debugging function in the application program; when the real machine debugging window is switched to a target debugging panel, the real machine debugging window acquires a first plug-in debugging protocol packet from a debugging tool main process, analyzes the calling information of the small program plug-in and displays the small program plug-in on the target debugging panel; when the real machine debugging window initiates a plug-in debugging operation aiming at the target debugging panel, the real machine debugging window pushes a second plug-in debugging protocol packet to an application program through a pre-established bidirectional communication channel; the application enters a plug-in debug mode in response to the second plug-in debug protocol packet. By the method, more comprehensive and real plug-in debugging can be provided.

Description

Applet plug-in debugging method, system and computer readable storage medium
Technical Field
The invention belongs to the field of debugging, and particularly relates to a debugging method and device for an applet plug-in and a computer readable storage medium.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
With the continuous development of the internet, the applet is used as an application which can be used without downloading and installation, new use experience is brought to users, and in recent two years, the applet has developed into a sharer for connecting industries and serving users, and plays an especially important role in promoting digital life services.
However, the existing applet plug-in debugging schemes still have some limitations, for example, debugging such as service logic and plug-in calling is usually performed in a debugging tool for simulation, and is not performed in a production version of an application program for debugging, so that the debugging cannot be performed comprehensively and truly.
Disclosure of Invention
In view of the problems in the prior art, an applet debugging method, system and computer readable storage medium are provided, by which the above problems can be solved.
The present invention provides the following.
In a first aspect, a method for debugging an applet plug-in is provided, including: when a target applet calls an applet plug-in to be debugged, the application program sends a first plug-in debugging protocol package to a debugging tool main process, wherein the target applet runs in an applet container which starts a debugging function in the application program; when the real machine debugging window is switched to a target debugging panel, the real machine debugging window acquires a first plug-in debugging protocol packet from a debugging tool main process, analyzes the calling information of the small program plug-in and displays the small program plug-in on the target debugging panel; when the real machine debugging window initiates a plug-in debugging operation aiming at the target debugging panel, the real machine debugging window pushes a second plug-in debugging protocol packet to an application program through a pre-established bidirectional communication channel; the application enters a plug-in debug mode in response to the second plug-in debug protocol packet.
In some embodiments, the method further comprises the step of establishing a bidirectional communication channel, including: the debugging tool main process acquires debugging information of one or more small programs which pass the permission verification from one or more application programs, wherein the debugging information comprises: an applet identifier and an applet container debugging server address; the method comprises the steps that a debugging tool rendering process obtains a debuggable small program list from a debugging tool main process, wherein the debuggable small program list comprises debugging information of one or more small programs;
the real machine debugging window acquires an applet container debugging server address corresponding to a target applet selected in the debuggable applet list from a debugging tool rendering process; and the real machine debugging window is used as an applet container debugging client to be connected to an applet container debugging server address corresponding to the target applet so as to establish a bidirectional communication channel between the real machine debugging window and the application program where the target applet is located.
In some embodiments, further comprising: the application program and the debugging tool main process are connected through encapsulated USB/ADB service channel communication.
In some embodiments, the first plug-in debug protocol package is constructed based on a custom plug-in debug protocol format, the custom plug-in debug protocol format comprising: methods, requests and responses; the method comprises a main protocol, a plug-in name and a plug-in action; the request consists of a request ID, request parameters and parameter values; the response consists of a callback ID, response parameters, and parameter values.
In some embodiments, further comprising: an application program acquires applet configuration information of one or more applets; and carrying out authority verification according to the applet configuration information; wherein the permission check comprises one or more of the following: checking whether the applet is allowed to run or not, checking whether the applet plug-in can be used or not, and checking whether the applet debugging authority is opened or not.
In some embodiments, the bidirectional communication channel is a websocket channel, the applet container debugging server is a websocket server, and the applet container debugging client is a websocket client.
In some embodiments, the debug tool rendering process obtains the list of debuggable applets from the debug tool host process through inter-process communication.
In some embodiments, the debugging tool is an Electron-based implementation.
In some embodiments, the live machine debug window is implemented based on Chrome DevTools.
In some embodiments, when the live machine debugging window is switched, sending a switching second plug-in debugging protocol packet based on the bidirectional communication channel; and the application program intercepts and switches the second plug-in debugging protocol packet, and executes scheduling to switch the corresponding small program container to the foreground.
In a second aspect, an applet debugging system is provided, including: an application program, a debugging tool main process and a real machine debugging window; the target small program runs in a small program container which starts a debugging function in the application program; the debugging tool comprises an application program, a debugging tool main process and a debugging tool main process, wherein the application program is used for sending a first plug-in debugging protocol packet to the debugging tool main process when a target small program calls a plug-in of a small program to be debugged; the real machine debugging window is used for acquiring a first plug-in debugging protocol packet from a debugging tool main process when switching to a target debugging panel, analyzing the calling information of the applet plug-in and displaying the calling information on the target debugging panel; the system is also used for pushing a second plug-in debugging protocol packet to the application program through a pre-established bidirectional communication channel when the plug-in debugging operation aiming at the target debugging panel is initiated; and the application program is used for responding to the second plug-in debugging protocol packet to enter a plug-in debugging mode.
In a third aspect, an applet debugging apparatus is provided, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform: the method of the first aspect.
In a fourth aspect, there is provided a computer readable storage medium storing a program which, when executed by a multicore processor, causes the multicore processor to perform the method of the first aspect.
The embodiment of the application adopts at least one technical scheme which can achieve the following beneficial effects: the small program plug-ins are all operated in the production version application program for debugging, and more comprehensive and real plug-in debugging is provided.
It should be understood that the above description is only an overview of the technical solutions of the present invention, so as to clearly understand the technical means of the present invention, and thus can be implemented according to the content of the description. In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
Drawings
The advantages and benefits herein, as well as other advantages and benefits, will be apparent to one of ordinary skill in the art upon reading the following detailed description of the exemplary embodiments. The drawings are only for purposes of illustrating exemplary embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like elements throughout. In the drawings:
FIG. 1 is a flowchart illustrating a debugging method of an applet plug-in according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating an applet debugging system according to an embodiment of the present invention;
FIG. 3 is an interaction diagram of a debugging method of an applet plug-in according to an embodiment of the invention;
FIG. 4 is a flowchart illustrating a debugging method of an applet plug-in according to another embodiment of the present invention;
FIG. 5 is a diagram illustrating an applet debugging apparatus according to another embodiment of the present invention.
In the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
In the description of the embodiments of the present application, it is to be understood that terms such as "including" or "having" are intended to indicate the presence of the features, numbers, steps, actions, components, parts, or combinations thereof disclosed in the specification, and are not intended to preclude the presence or addition of one or more other features, numbers, steps, actions, components, parts, or combinations thereof.
Unless otherwise stated, "/" indicates an OR meaning, e.g., A/B may indicate A or B; "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone.
The terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first," "second," etc. may explicitly or implicitly include one or more of that feature. In the description of the embodiments of the present application, "a plurality" means two or more unless otherwise specified.
All code in this application is exemplary and variations will occur to those skilled in the art based upon the programming language used, the specific needs and personal habits without departing from the spirit of the application.
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict. The present invention will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 is a schematic flowchart of a method for debugging an applet plug-in real time according to an embodiment of the present application, in which, from a device perspective, an execution subject may be one or more electronic devices; from the program perspective, the execution main body may accordingly be a program loaded on these electronic devices.
As shown in fig. 1, the method provided by this embodiment may include the following steps:
s101, when a target applet calls an applet plug-in to be debugged, an application program sends a first plug-in debugging protocol packet to a debugging tool main process;
wherein the target applet runs in an applet container that starts a debugging function in the application.
In particular, the transfer of the first plug-in debug protocol package may be accomplished through a service channel between the application and the debug tool.
In some embodiments, the communication connection between the application program and the debugging tool main process can be realized through an encapsulated USB/ADB service channel. Optionally, the application program and the debugging tool main process can also realize communication connection through a network service channel.
Specifically, a Universal Serial Bus (USB) is used for data communication between devices such as an apple or an android device and desktop devices such as a computer. The ADB (Android Debug Bridge) is a client-server program, in which the client is a computer for operation and the server is an Android device.
The first plug-in debugging protocol packet is a data packet which is constructed based on a custom plug-in debugging protocol format and contains applet calling information.
In some embodiments, the custom plug-in debug protocol format comprises: methods, requests and responses; the method comprises a main protocol, a plug-in name and a plug-in action; the request consists of a request ID, request parameters and parameter values; the response consists of a callback ID, response parameters, and parameter values.
For example, the plug-in debug protocol format is shown below and comprises three parts, namely a Method, a Request and a Response. Wherein the Method consists of: [ primary protocol, plug-in name, plug-in action ]. The Request consists of: reqId (request Id, incremental generation) and specific request parameters and parameter values. Response consists of callback Id (value equals request Id) and specific Response parameters and parameter values.
S102, when the real machine debugging window is switched to a target debugging panel, the real machine debugging window acquires a first plug-in debugging protocol packet from a debugging tool main process, analyzes the small program plug-in calling information and displays the small program plug-in calling information on the target debugging panel;
it can be understood that the debugging tool host process may store the first plug-in debugging protocol package after obtaining the first plug-in debugging protocol package, and only when the real machine debugging window is switched to the target debugging panel for the plug-in debugging, the real machine debugging window needs to obtain the first plug-in debugging protocol package from the storage service and analyze the first plug-in debugging protocol package to obtain the applet plug-in calling information, and display the applet plug-in calling information in the real machine debugging window, so that a developer may trigger the generation of plug-in debugging operations, such as setting a breakpoint, in the target debugging panel according to the displayed applet plug-in calling information. The target debugging panel is a panel preset correspondingly for plug-in debugging. For example, if the primary protocol in the first plug-in debug protocol package is cordiva, it is shown in a cordiva panel, and if the primary protocol is jsbridge, it is shown in a jsbridge panel.
S103, when the real machine debugging window initiates a plug-in debugging operation aiming at the target debugging panel, the real machine debugging window pushes a second plug-in debugging protocol packet to the application program through a pre-established bidirectional communication channel;
it is understood that the second plug-in debug protocol packet refers to a data packet generated based on a customized plug-in debug protocol format and according to a plug-in debug operation. Because a bidirectional communication channel is established in advance between the real machine debugging window and the small program container running the target small program in the application program to serve as a debugging channel, various kinds of debugging of the target small program can be realized.
In some embodiments, the bidirectional communication channel may be a websocket channel, the applet container debugging server is a websocket server, and the applet container debugging client is a websocket client.
And S104, the application program responds to the second plug-in debugging protocol packet to enter a plug-in debugging mode.
Wherein the application may be configured to enter the plug-in debug mode upon receiving the data packet having the plug-in debug protocol format, such that the application may enter the plug-in debug mode in response to the second plug-in debug protocol packet.
FIG. 2 illustrates an exemplary debug environment that performs S101-104 described above; the debugging tool rendering process and the debugging tool rendering process are in communication connection through interprocess communication, and the debugging tool rendering process, the debugging tool rendering process and the real machine debugging window are in communication connection through local storage service.
As shown in fig. 3, an exemplary interaction diagram based on an embodiment of the present application is shown, and fig. 3 is described in detail below in conjunction with fig. 2.
S101a, calling an applet plug-in to be debugged by the target applet; s101b, the application program of the target applet sends a first plug-in debugging protocol package to a debugging tool main process through a USB/ADB service channel; s102a, when the real machine debugging window is switched to the target debugging panel, the real machine debugging window acquires a first plug-in debugging protocol packet from the debugging tool main process through the local storage service; s102b, analyzing the applet plug-in calling information through the real machine debugging window; s102c, displaying the applet plug-in calling information on a target debugging panel by a real machine debugging window so as to enable a developer to debug; s103a, the real machine debugging window initiates a plug-in debugging operation aiming at the target debugging panel; s103b, the real machine debugging window pushes a second plug-in debugging protocol package to the application program through a preset websocket channel; and S104, the application program responds to the second plug-in debugging protocol packet to enter a plug-in debugging mode aiming at the target applet.
As shown in fig. 4, showing the steps of how to establish the above-described bi-directional communication channel, as described in detail below in connection with fig. 4,
establishing the bidirectional communication channel comprises:
s201, the main process of the debugging tool acquires debugging information of one or more small programs which pass the permission verification from one or more application programs;
and the small program passing the authority verification runs in a small program container for starting a debugging function in the application program. The debugging information includes: and the small program identifier and the small program container debugging server address. For example, the applet identification may be an applet page address, an applet title, etc.
S202, the debugging tool rendering process acquires a debuggable small program list from the debugging tool main process.
Wherein the list of debuggable applets includes debugging information for one or more applets. For example, each entry in the list contains debug information such as an applet page address, a title, an applet container debug server address, and the like
S203, the real machine debugging window acquires an applet container debugging server address corresponding to a target applet selected from the debuggable applet list from the debugging tool rendering process;
the debugging tool rendering process displays the debuggable applet list, a developer can select a target applet which is expected to be debugged through a trigger action and informs a real machine debugging window, and the real machine debugging window can obtain an applet container debugging server address corresponding to the target applet from the debugging tool rendering process.
And S204, the real machine debugging window is used as an applet container debugging client to be connected to an applet container debugging server address corresponding to the target applet so as to establish a bidirectional communication channel between the real machine debugging window and the application program where the target applet is located.
For example, after performing S201-S204 described above, the exemplary debug environment shown in FIG. 2 may be obtained.
Optionally, in addition to supporting the debugging of the applet, the debugging environment created based on the above steps 201 and 204 may also support debugging functions such as an applet page, a network request, and a web storage, so as to support the simultaneous debugging of multiple applets, thereby providing more flexible and efficient debugging of multiple instances of the plugin.
In some embodiments, before the foregoing S201, in order to perform applet security management and control, the following steps may also be performed:
an application program acquires applet configuration information of one or more applets; and the authority is checked according to the program configuration information; wherein the permission check comprises one or more of the following: checking whether the applet is allowed to run or not, checking whether the applet plug-in can be used or not, and checking whether the applet debugging authority is opened or not.
Further, if the applet passes the permission verification, the applet can be operated in the applet container with the debugging function started for subsequent debugging.
In some embodiments, the debugging tool is an Electron-based implementation. The debugging tool comprises a debugging tool main process and a debugging tool rendering process.
In some embodiments, the live machine debug window is implemented based on Chrome DevTools.
In some embodiments, when the live machine debugging window is switched, sending a switching second plug-in debugging protocol packet based on the bidirectional communication channel; and the application program intercepts and switches the second plug-in debugging protocol packet, and executes scheduling to switch the corresponding small program container to the foreground.
The applet plug-in debugging method provided by the embodiment of the application provides cross-end, real-time, safe, comprehensive, non-invasive, less network dependence and multi-instance applet plug-in debugging support. The small program plug-ins are all operated in the production version application program, and more comprehensive and real plug-in debugging is provided. Moreover, the applet source code is not required to be deployed in a specific platform, and the source code is not required to be transformed, so that a safer and controllable scheme is provided, and the method is suitable for the fields of financial industry and the like with high safety level requirements.
In the description of the present specification, reference to the description of the terms "some possible implementations," "some embodiments," "examples," "specific examples," or "some examples," or the like, means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
With regard to the method flow diagrams of embodiments of the present application, certain operations are described as different steps performed in a certain order. Such flow diagrams are illustrative and not restrictive. Certain steps described herein may be grouped together and performed in a single operation, may be divided into multiple sub-steps, and may be performed in an order different than that shown herein. The various steps shown in the flowcharts may be implemented in any way by any circuit structure and/or tangible mechanism (e.g., by software running on a computer device, hardware (e.g., logical functions implemented by a processor or chip), etc., and/or any combination thereof).
Based on the same technical concept, the embodiment of the invention also provides an applet plug-in debugging system, which is used for executing the applet plug-in debugging method provided by any one of the embodiments. Fig. 2 is a schematic diagram of an applet debugging system according to an embodiment of the present invention.
It includes: the method comprises the following steps of (1) applying a program, a debugging tool main process, a debugging tool rendering process and a real machine debugging window; the target small program runs in a small program container which starts a debugging function in the application program; the application program is used for sending a first plug-in debugging protocol package to the debugging tool main process when the target applet calls the applet plug-in to be debugged; the real machine debugging window is used for acquiring the first plug-in debugging protocol packet from the debugging tool main process when the real machine debugging window is switched to a target debugging panel, analyzing the calling information of the small program plug-in and displaying the small program plug-in on the target debugging panel; the system is also used for pushing a second plug-in debugging protocol packet to the application program through a pre-established bidirectional communication channel when the plug-in debugging operation aiming at the target debugging panel is initiated; the application program is used for responding to the second plug-in debugging protocol packet to enter a plug-in debugging mode.
It should be noted that the system in the embodiment of the present application may implement each process of the foregoing embodiment of the method, and achieve the same effect and function, which is not described herein again.
Fig. 5 is a device for debugging an applet plug-in according to an embodiment of the present application, configured to perform the method for debugging an applet plug-in shown in fig. 1, where the device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of the above embodiments.
According to some embodiments of the present application, there is provided a non-volatile computer storage medium of an applet debugging method having stored thereon computer executable instructions arranged to perform, when executed by a processor: the method as described in the above example.
The embodiments in the present application are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus, device, and computer-readable storage medium embodiments, the description is simplified because they are substantially similar to the method embodiments, and reference may be made to some descriptions of the method embodiments for their relevance.
The apparatus, the device, and the computer-readable storage medium provided in the embodiment of the present application correspond to the method one to one, and therefore, the apparatus, the device, and the computer-readable storage medium also have advantageous technical effects similar to those of the corresponding method.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. Moreover, while the operations of the method of the invention are depicted in the drawings in a particular order, this does not require or imply that the operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
While the spirit and principles of the invention have been described with reference to several particular embodiments, it is to be understood that the invention is not limited to the disclosed embodiments, nor is the division of aspects, which is for convenience only as the features in such aspects may not be combined to benefit. The invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (13)

1. An applet debugging method, comprising:
when a target applet calls an applet plug-in to be debugged, an application program sends a first plug-in debugging protocol package to a debugging tool main process, wherein the target applet runs in an applet container which starts a debugging function in the application program;
when a real machine debugging window is switched to a target debugging panel, the real machine debugging window acquires the first plug-in debugging protocol packet from the debugging tool main process, analyzes the applet plug-in calling information and displays the applet plug-in calling information on the target debugging panel;
when the real machine debugging window initiates a plug-in debugging operation aiming at the target debugging panel, the real machine debugging window pushes a second plug-in debugging protocol packet to the application program through a pre-established bidirectional communication channel;
the application program enters a plug-in debug mode in response to the second plug-in debug protocol packet.
2. The method of claim 1, further comprising the step of establishing the bi-directional communication channel, comprising:
the debugging tool main process acquires debugging information of one or more small programs which pass the permission verification from one or more application programs, wherein the debugging information comprises: an applet identifier and an applet container debugging server address;
the debugging tool rendering process acquires a debuggable applet list from the debugging tool main process, wherein the debuggable applet list comprises the debugging information of one or more applets;
the real machine debugging window acquires the applet container debugging server address corresponding to the target applet selected in the debuggable applet list from the debugging tool rendering process;
and the real machine debugging window is used as an applet container debugging client to be connected to the applet container debugging server address corresponding to the target applet so as to establish a bidirectional communication channel between the real machine debugging window and the application program of the target applet.
3. The method of claim 1 or 2, further comprising:
and the application program and the debugging tool main process are in communication connection through an encapsulated USB/ADB service channel.
4. The method of claim 1, wherein the first plug-in debug protocol package is constructed based on a custom plug-in debug protocol format, the custom plug-in debug protocol format comprising: methods, requests and responses; wherein the content of the first and second substances,
the method comprises a main protocol, a plug-in name and a plug-in action; the request consists of a request ID, request parameters and parameter values; the response consists of a callback ID, response parameters and parameter values.
5. The method of claim 2, further comprising:
the application program acquires applet configuration information of one or more applets; and carrying out authority verification according to the applet configuration information;
wherein the permission check includes one or more of: checking whether the applet is allowed to run or not, checking whether the applet plug-in can be used or not, and checking whether the applet debugging authority is opened or not.
6. The method of claim 1 or 2, wherein the bidirectional communication channel is a websocket channel, the applet container debugging server is a websocket server, and the applet container debugging client is a websocket client.
7. The method of claim 1, wherein the debugging tool rendering process obtains a list of debuggable applets from the debugging tool host process through inter-process communication.
8. The method of claim 1, wherein the debugging tool is implemented based on Electron.
9. The method of claim 1, wherein the live machine debugging window is implemented based on Chrome DevTools.
10. The method of claim 1, wherein when switching a live machine debugging window, sending a switch second plug-in debugging protocol packet based on the bidirectional communication channel; and the application program intercepts and switches the second plug-in debugging protocol packet, and executes scheduling to switch the corresponding small program container to the foreground.
11. An applet debugging system comprising: an application program, a debugging tool main process and a real machine debugging window; the target small program runs in a small program container which starts a debugging function in the application program;
the application program is used for sending a first plug-in debugging protocol package to the debugging tool main process when the target applet calls the applet plug-in to be debugged;
the real machine debugging window is used for acquiring the first plug-in debugging protocol packet from the debugging tool main process when the real machine debugging window is switched to a target debugging panel, analyzing the calling information of the small program plug-in and displaying the small program plug-in on the target debugging panel; the system is also used for pushing a second plug-in debugging protocol packet to the application program through a pre-established bidirectional communication channel when the plug-in debugging operation aiming at the target debugging panel is initiated;
the application program is used for responding to the second plug-in debugging protocol packet to enter a plug-in debugging mode.
12. An applet debugging apparatus comprising:
at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform: the method of any one of claims 1-10.
13. A computer-readable storage medium storing a program that, when executed by a multi-core processor, causes the multi-core processor to perform the method of any one of claims 1-10.
CN202111553679.3A 2021-12-17 2021-12-17 Applet plug-in debugging method, system and computer readable storage medium Pending CN114328197A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111553679.3A CN114328197A (en) 2021-12-17 2021-12-17 Applet plug-in debugging method, system and computer readable storage medium
PCT/CN2022/117422 WO2023109202A1 (en) 2021-12-17 2022-09-07 Applet plugin debugging method and system, and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111553679.3A CN114328197A (en) 2021-12-17 2021-12-17 Applet plug-in debugging method, system and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN114328197A true CN114328197A (en) 2022-04-12

Family

ID=81051954

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111553679.3A Pending CN114328197A (en) 2021-12-17 2021-12-17 Applet plug-in debugging method, system and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN114328197A (en)
WO (1) WO2023109202A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023109202A1 (en) * 2021-12-17 2023-06-22 中国银联股份有限公司 Applet plugin debugging method and system, and computer readable storage medium
CN117076159A (en) * 2023-10-10 2023-11-17 统信软件技术有限公司 Plug-in calling method and device, electronic equipment and computer readable storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116520815B (en) * 2023-07-03 2023-10-17 合众新能源汽车股份有限公司 Remote diagnosis method, device, computer equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110032512B (en) * 2019-03-28 2021-04-20 腾讯科技(深圳)有限公司 Debugging method of small program, related equipment and terminal
CN112783748B (en) * 2019-11-06 2024-02-20 腾讯科技(深圳)有限公司 Program debugging method, device, equipment and computer readable storage medium
US11210205B2 (en) * 2020-02-28 2021-12-28 Sap Se Application debugging
CN114328197A (en) * 2021-12-17 2022-04-12 中国银联股份有限公司 Applet plug-in debugging method, system and computer readable storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023109202A1 (en) * 2021-12-17 2023-06-22 中国银联股份有限公司 Applet plugin debugging method and system, and computer readable storage medium
CN117076159A (en) * 2023-10-10 2023-11-17 统信软件技术有限公司 Plug-in calling method and device, electronic equipment and computer readable storage medium
CN117076159B (en) * 2023-10-10 2024-01-05 统信软件技术有限公司 Plug-in calling method and device, electronic equipment and computer readable storage medium

Also Published As

Publication number Publication date
WO2023109202A1 (en) 2023-06-22

Similar Documents

Publication Publication Date Title
CN114328197A (en) Applet plug-in debugging method, system and computer readable storage medium
KR102236522B1 (en) Method and apparatus for processing information
CN108984170B (en) H5 page multi-language rendering method and device
CN108694117B (en) Method and device for managing test environment based on container technology
CN106897206B (en) Service testing method and device
CN107092473B (en) Desktop application development method and device
US9535754B1 (en) Dynamic provisioning of computing resources
CN103001963A (en) Minimal download and simulation page navigation characteristic
CN105577813B (en) A kind of update method and system of web mixing application
CN106933887B (en) Data visualization method and device
CN104881318A (en) Interface calling method and device and terminal
US20200341752A1 (en) Electronic apparatus and method for controlling thereof
CN113868126A (en) Application debugging method, device and storage medium of equipment
CN110825426B (en) Webpage development method, preview method, publishing method and development system
CN108549537A (en) The method and system of user data acquisition based on Android terminal
US9594662B2 (en) Automated instrumentation of applications
CN110795353B (en) Quick application debugging method, device, equipment and storage medium
Rechert et al. Introduction to an emulation-based preservation strategy for software-based artworks
US11604662B2 (en) System and method for accelerating modernization of user interfaces in a computing environment
US11494184B1 (en) Creation of transportability container files for serverless applications
CN107608672B (en) UI module manager, UI module management method and system
Bhardwaj et al. Serving mobile apps: A slice at a time
CN112987936A (en) Interactive processing method, system, device, equipment and medium
US10997269B1 (en) Using web application components with different web application frameworks in a web application
Liu et al. Automatic cloud service testing and bottleneck detection system with scaling recommendation

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