CN114356759A - Applet debugging method, device, equipment, medium and computer program product - Google Patents

Applet debugging method, device, equipment, medium and computer program product Download PDF

Info

Publication number
CN114356759A
CN114356759A CN202111601614.1A CN202111601614A CN114356759A CN 114356759 A CN114356759 A CN 114356759A CN 202111601614 A CN202111601614 A CN 202111601614A CN 114356759 A CN114356759 A CN 114356759A
Authority
CN
China
Prior art keywords
debugging
applet
code
abnormal
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111601614.1A
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202111601614.1A priority Critical patent/CN114356759A/en
Publication of CN114356759A publication Critical patent/CN114356759A/en
Pending legal-status Critical Current

Links

Abstract

The disclosure provides a small program debugging method, a small program debugging device, a small program debugging medium and a computer program product, and relates to the technical field of computers, in particular to the technical field of software testing. The specific technical scheme comprises the following steps: acquiring a code packet of the applet sent by the second electronic equipment, and analyzing the code packet to obtain a service code and a debugging code of the applet; running the applet based on the service code; acquiring abnormal information in the running process of the small program; and calling the debugging code to debug the small program according to the abnormal information. The technical scheme of the disclosure can improve the efficiency of problem positioning and debugging.

Description

Applet debugging method, device, equipment, medium and computer program product
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, a medium, and a computer program product for debugging an applet.
Background
With the ecological improvement of the small programs, the service scenes using the small programs are more and more abundant and diversified. Some small programs with middle station properties do not reserve development manpower when an access party is newly added after the functions are complete, and when the problems of unmatched host environments, interface environments and the like of the access party occur, the developers of the small programs with the middle station are required to assist positioning and debugging (debug), so that the problem solving efficiency is low.
Disclosure of Invention
The disclosure provides an applet debugging method, apparatus, device, medium and computer program product.
According to a first aspect of the present disclosure, there is provided an applet debugging method applied to a first electronic device, the method including:
acquiring a code packet of the applet sent by the second electronic equipment, and analyzing the code packet to obtain a service code and a debugging code of the applet;
running the applet based on the service code;
acquiring abnormal information in the running process of the small program;
and calling the debugging code to debug the small program according to the abnormal information.
According to a second aspect of the present disclosure, there is provided an applet debugging method applied to a second electronic device, the method including:
sending a code packet of the applet to the first electronic device; the code packet comprises service codes and debugging codes of the small program, and the debugging codes are used for debugging the small program.
According to a third aspect of the present disclosure, there is provided an applet debugging method including:
the second electronic equipment sends a code packet of the applet to the first electronic equipment;
the method comprises the steps that first electronic equipment obtains a code packet of an applet sent by second electronic equipment, and the code packet is analyzed to obtain a service code and a debugging code of the applet;
the first electronic equipment runs the small program based on the service code and acquires abnormal information in the running process of the small program;
and the first electronic equipment calls the debugging codes to debug the small programs according to the abnormal information.
According to a fourth aspect of the present disclosure, there is provided an applet debugging apparatus applied to a first electronic device, the apparatus including:
the code acquisition module is used for acquiring a code packet of the applet sent by the second electronic equipment and analyzing the code packet to obtain a service code and a debugging code of the applet;
the program running module is used for running the small program based on the service code;
the abnormal information acquisition module is used for acquiring abnormal information in the running process of the small program;
and the debugging module is used for calling the debugging codes to debug the small programs according to the abnormal information.
According to a fifth aspect of the present disclosure, there is provided an applet debugging apparatus applied to a second electronic device, the apparatus including:
the code packet sending module is used for sending a code packet of the applet to the first electronic equipment; the code packet comprises service codes and debugging codes of the small program, and the debugging codes are used for debugging the small program.
According to a sixth aspect of the present disclosure, there is provided an electronic apparatus, as a first electronic apparatus, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the applet debugging method applied to the first electronic device provided by any one of the embodiments of the disclosure.
According to a seventh aspect of the present disclosure, there is provided an electronic apparatus, as the second electronic apparatus, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the applet debugging method applied to the second electronic device provided by any one of the embodiments of the disclosure.
According to an eighth aspect of the present disclosure, there is provided an applet debugging system including: the first electronic equipment and the second electronic equipment are connected in a communication mode.
According to a ninth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform: the method for debugging the small program applied to the first electronic device or the method for debugging the small program applied to the second electronic device is provided by any embodiment of the disclosure.
According to a tenth aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements: the method for debugging the small program applied to the first electronic device or the method for debugging the small program applied to the second electronic device is provided by any embodiment of the disclosure.
The technical scheme of the present disclosure can at least realize the following beneficial effects:
the development party of the applet can pre-configure debugging codes in the code packet of the applet through the first electronic device, and sends the debugging codes to the access party of the applet, and the access party can locate and debug the problems of the applet locally by self based on the second electronic device and the abnormal information by calling the debugging codes without depending on the development party to assist in locating and debugging, so that the efficiency of solving the problems can be improved, and the communication cost is reduced.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 is a schematic flowchart of an applet debugging method provided in an embodiment of the present disclosure;
fig. 2 is a schematic diagram of a function page and a debugging page in an applet debugging method provided by an embodiment of the present disclosure;
FIG. 3 is a flowchart illustrating another applet debugging method provided by an embodiment of the present disclosure;
FIG. 4 is a schematic structural framework diagram of an applet debugging apparatus provided in an embodiment of the present disclosure;
FIG. 5 is a block diagram of an applet debugging system according to an embodiment of the disclosure;
fig. 6 is a schematic structural framework diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the description of the embodiments of the present disclosure, it should be understood that the terms "first", "second", and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicit indication of the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the embodiments of the present disclosure, "a plurality" means two or more unless otherwise specified.
It should be further understood that the term "and/or" as used in connection with embodiments of the present disclosure includes all or any and all combinations of one or more of the associated listed items.
It will be understood by those of ordinary skill in the art that, unless otherwise defined, all terms (including technical and scientific terms) used in the embodiments of the present disclosure have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs.
The following describes the technical solutions of the present disclosure and how to solve the above technical problems in detail with specific embodiments.
According to an embodiment of the present disclosure, the present disclosure provides an applet debugging method, which is applicable to a first electronic device (for example, an electronic device of an applet access party) as shown in fig. 1, and the method includes:
s101, the second electronic device (for example, the electronic device of the applet developer) sends the code packet of the applet to the first electronic device.
The code package may be pre-compiled in accordance with received compilation instructions, which may be input by a user.
The code packet includes service codes and debugging codes of the applet, the service codes are used for providing service functions of the applet, the service functions can be displayed in a form of a function page as shown in fig. 2, the debugging codes are used for debugging the applet, and the debugging codes can be compiled in advance and added into the service codes in a form of a plug-in.
The debugging code can comprise at least one part of code such as a first part of code, a second part of code, a third part of code, a fourth part of code, a fifth part of code and the like. The first part of code can be used for showing the running state of the small program in the function page of the small program; the second part of code can be used for generating a debugging page and printing an exception log in an exception log area in the debugging page, the debugging page can also comprise a server address input box or other areas set according to actual requirements, fig. 2 shows a debugging page, the page is only used as an example, and it can be understood that the debugging page can also have other presentation modes; the third part of codes can be used for updating variables acquired by an interface (application program interface API) request based on the updating of the server address; the fourth part of codes can be used for debugging the small program, and the fourth part of codes can comprise codes for debugging multiple types of problems; the fifth part of code may be used to implement a failure callback for exception information.
S102, the first electronic equipment obtains a code packet of the applet sent by the second electronic equipment, and analyzes the code packet to obtain a service code and a debugging code of the applet.
S103, the first electronic device runs the small program based on the service code, and obtains abnormal information in the running process of the small program.
In an alternative embodiment, the exception information may be obtained by: the second electronic equipment monitors the running process of the small program, and sends abnormal information to the first electronic equipment when the abnormal running of the small program is monitored; the method comprises the steps that the first electronic equipment obtains abnormal information in the small program running process monitored by the second electronic equipment.
In one example, the second electronic device may obtain and display operation data of the applet, the developer may determine whether the applet is abnormal based on the displayed operation data, input abnormal information or selection information for selecting the abnormal information, and the second electronic device transmits the abnormal information to the first electronic device in response to the input of the developer.
In another example, the second electronic device may obtain operation data of the applet, determine whether the applet has an abnormality based on a preset monitoring policy, and send abnormality information to the access terminal when the abnormality occurs. The monitoring policy may include information of the monitored object, a condition that the monitored object is abnormal, and the like, and the monitored object may include at least one object of end capability, an interface and a script language (JS or JS for short), and may also include other objects to be monitored. Xx end-capabilities, where swan is a programming language used to compile applets, xx represents no specific end.
The above approach can be implemented without the access side's tester knowing the applet's business logic and monitoring policy.
In another alternative embodiment, the exception information may be obtained by: the first electronic equipment monitors the running process of the small program and acquires abnormal information when the running of the small program is abnormal.
In one example, the first electronic device may present operation data of the applet, and the access party tester may determine whether the applet is abnormal based on the presented operation data, and input abnormal information or selection information for selecting the abnormal information. This approach can be implemented with knowledge of the business logic and monitoring strategy of the applet by the tester.
In one example, the first electronic device may monitor the running process of the applet according to a pre-acquired monitoring policy.
Based on the two implementation modes, the abnormal information in the running process of the applet can be monitored and acquired by the second electronic device so as to meet the monitoring requirement of the access party who does not know the business logic and the monitoring strategy, and can also be monitored and acquired by the first electronic device so as to meet the monitoring requirement of the access party who knows the business logic and the monitoring strategy, so that the flexibility is strong.
Optionally, the exception information includes at least one of exception information of the end capability, exception information of the interface, and exception information of the scripting language. In some examples, the anomaly information may also include anomaly information of other monitored objects. The abnormal information of a plurality of monitoring objects can provide more sufficient information, so that the problem can be more accurately positioned.
And S104, the first electronic equipment calls the debugging codes to debug the small programs according to the abnormal information.
Optionally, the first electronic device calls the debugging code to print the abnormal information as an abnormal log according to the abnormal information, and debugs the applet according to the abnormal log. And the abnormal information is printed as an abnormal log, so that a tester can conveniently check the abnormal information at any time, and the problem of the small program can be quickly positioned.
The printing of the abnormality log can be realized by any one of the following two embodiments:
in an optional implementation manner, the first electronic device calls a first part of codes in the debugging codes according to the abnormal information, and displays the running state of the applet in the functional page of the applet; the first electronic equipment responds to the received printing instruction, calls a second part of codes in the debugging codes, and prints the abnormal information as an abnormal log in an abnormal log printing area of the debugging page. Wherein, the printing instruction is obtained according to the input operation of the user (such as the tester of the access party) for the running state.
The running status can be shown in the form of a floating button as shown in fig. 2, information of the running status (i.e. whether an abnormality occurs) can be briefly shown in the floating button, and a current server address can also be shown in the floating button, and in the example of fig. 2, the floating button shows the following information:
server (Server): xxxx (real scene xxxx can be a concrete server address)
End capability abnormality: is free of
Js Exception: is free of
And (3) interface exception: is free of
The above information display manner is only used as an example, and is not limited to the embodiment of the present disclosure, and in a real test scenario, corresponding information may be displayed in other manners according to actual needs.
In an optional implementation manner, if the first electronic device does not successfully acquire the abnormal information of the second electronic device in the process of acquiring the abnormal information, a fifth part of the debugging codes may be called to perform information callback, and the abnormal information is acquired again.
The running state is displayed in the functional page, so that a tester can visually know the running state of the applet, for example, whether the monitoring object is abnormal or not, what monitoring object is abnormal or not and the like, the tester can independently select whether the abnormal information needs to be checked and an abnormal log needs to be printed or not based on the displayed information, and under the condition that the abnormal information needs to be checked and the abnormal log needs to be printed, the tester can trigger the floating button to generate a printing instruction, so that the first electronic device calls the second part of codes in the debugging codes, and the abnormal information is printed as the abnormal log in the abnormal log printing area of the debugging page, so that the printing of the unnecessary abnormal log is reduced. The way to trigger the hover button may be touch or click as shown in fig. 2.
In another optional implementation, the first electronic device calls a second part of codes in the debugging codes in response to the monitored abnormal information, and the abnormal information is printed as an abnormal log in an abnormal log printing area of the debugging page.
In this way, the first electronic device does not need to show the running state of the applet to the tester, and the tester does not need to select whether to check the abnormal information and print the abnormal log, so that the abnormal log can be directly printed in the abnormal log printing area of the debugging page, the printing efficiency of the abnormal log can be improved, and the subsequent efficiency of problem location and debugging can be further improved.
In the embodiment of the present disclosure, debugging the applet according to the exception log may be implemented in the following manner: and displaying the abnormal log in a debugging page or other pages, enabling a tester to position the problem of the applet according to the displayed abnormal log and input a debugging instruction, responding to the debugging instruction by the first electronic equipment, calling a fourth part of codes (which can be provided with codes for debugging the positioned problem in the fourth part of codes) in the debugging code, and debugging the applet.
In an optional implementation manner, the applet debugging method provided by the present disclosure further includes:
and the first electronic equipment responds to the update of the server address in the debugging page, calls a third part of codes in the debugging codes, and updates the variable acquired by the interface request of the applet into the variable corresponding to the updated server address.
The access party tester can input a new server address in a server address input box of a debugging page, the first electronic device responds to the input operation of the new server address, can call a third part of codes in the debugging codes, updates a variable acquired by an interface request of the applet into a variable of the new server address, immediately sends the request to update the variable of the interface after the variable acquired by the interface request is updated, and also can store the variable to be acquired, and sends the request to update the variable of the interface when the variable needs to be updated. Based on the mode, the first electronic equipment can realize the dynamic update of the interface variable, so that an access party can flexibly access an online environment and an offline environment conveniently, and the interface parameter configuration can be updated without depending on a developer.
In an optional implementation manner, the applet debugging method provided by the present disclosure further includes:
the second electronic device transmitting a Software Development Kit (SDK) of the applet and the hosting environment information to the first electronic device; the first electronic device obtains a software tool development kit and host environment information of the applet of the second electronic device, and the applet is debugged according to the exception log, the software tool development kit and the host environment information in response to the received debugging instruction.
The software tool development kit and the host environment information can provide more sufficient information for positioning and debugging the problems of the small program, and a tester can comprehensively consider and position the problems of the small program and debug the problems based on the positioned problems based on the comprehensive information of the abnormal logs, the software tool development kit and the host environment information.
According to an embodiment of the present disclosure, the present disclosure further provides an applet debugging method, as shown in fig. 3, the method including:
s301, the second electronic equipment sends a code packet of the applet to the first electronic equipment;
s302, the first electronic equipment acquires a code packet of the applet sent by the second electronic equipment, and analyzes the code packet to obtain a service code and a debugging code of the applet;
s303, the first electronic equipment runs the applet based on the service code, monitors the running process of the applet and sends abnormal information to the first electronic equipment when the fact that the running of the applet is abnormal is monitored;
s304, the first electronic equipment acquires abnormal information in the small program running process monitored by the second electronic equipment;
s305, calling a first part of codes in the debugging codes by the first electronic equipment according to the abnormal information, and displaying the running state of the small program in a function page of the small program;
s306, the first electronic equipment responds to the received printing instruction, calls a second part of codes in the debugging codes, and prints abnormal information as an abnormal log in an abnormal log printing area of the debugging page;
s307, positioning the problems of the small program according to the abnormal log, and debugging the positioned problems.
For the specific implementation and examples of steps S301 to S307, reference may be made to relevant contents of the foregoing embodiments, and details are not repeated here.
The technical scheme disclosed by the invention can be applied to the test stage of an access party, the debugging codes are called for debugging in the test stage, the debugging codes are not called in the non-debugging stage such as the on-line operation stage of the small program, the normal on-line operation of the small program is not influenced, and the on-line and off-line isolation can be realized; the debugging codes can be compiled in advance in the compiling stage, extra attention is not needed in development, and only the command needs to be executed again to generate new debugging codes in the function iteration of the small program; developers can apply the technical scheme of the disclosure to other platform applets or other technical architecture applications by modifying the monitored interface format, and can add and delete debugging codes compiled in a compiling stage according to an actual scene, so that the technical scheme of the disclosure has strong expansibility.
According to an embodiment of the present disclosure, the present disclosure further provides an applet debugging apparatus, which is applicable to a first electronic device, and as shown in fig. 4, the apparatus includes: a code acquisition module 401, a program running module 402, an exception information acquisition module 403, and a debugging module 404.
The code obtaining module 401 is configured to obtain a code packet of the applet sent by the second electronic device, and analyze the code packet to obtain a service code and a debugging code of the applet.
A program running module 402 for running the applet based on the service code.
An exception information obtaining module 403, configured to obtain exception information in the running process of the applet.
And the debugging module 404 is configured to invoke the debugging code to debug the applet according to the abnormal information.
Optionally, the abnormal information obtaining module 403 is specifically configured to: acquiring abnormal information in the running process of the applet monitored by the second electronic equipment; or monitoring the running process of the small program, and acquiring abnormal information when the running of the small program is abnormal.
Optionally, the debugging module 404 is specifically configured to: and calling the debugging code to print the abnormal information into an abnormal log, and debugging the applet according to the abnormal log.
In an optional implementation, the debugging module 404 is specifically configured to: calling a first part of codes in the debugging codes, and displaying the running state of the small program in a function page of the small program; in response to the received printing instruction, calling a second part of codes in the debugging codes, and printing the abnormal information as an abnormal log in an abnormal log printing area of the debugging page; the print instruction is obtained according to an input operation of the user for the running state.
In another optional implementation, the debugging module 404 is specifically configured to: and responding to the monitored abnormal information, calling a second part of codes in the debugging codes, and printing the abnormal information into an abnormal log in an abnormal log printing area of the debugging page.
Optionally, the applet debugging apparatus provided in the present disclosure may further include: and an interface variable updating module. The interface variable updating module is used for responding to the update of the server address in the debugging page, calling a third part of codes in the debugging codes, and updating the variables acquired by the interface request of the applet into the variables corresponding to the server address.
Optionally, the exception information includes at least one of exception information of the end capability, exception information of the interface, and exception information of the scripting language.
Optionally, the applet debugging apparatus provided in the present disclosure may further include: and the environment information acquisition module. The environment information acquisition module is used for acquiring the software tool development kit and the host environment information of the applet.
Optionally, the debugging module 404 is specifically configured to: and responding to the received debugging instruction, and debugging the applet according to the abnormal log, the software tool development kit and the host environment information.
According to an embodiment of the present disclosure, the present disclosure further provides an applet debugging apparatus, which is applicable to a second electronic device, and includes: the code packet sending module is used for sending a code packet of the applet to the first electronic equipment; the code packet comprises service codes and debugging codes of the small program, and the debugging codes are used for debugging the small program.
Optionally, the applet debugging apparatus applied to the second electronic device provided in the present disclosure may further include: and the abnormal information sending module is used for monitoring the running process of the small program and sending abnormal information to the first electronic equipment when the abnormal running of the small program is monitored.
Optionally, the applet debugging apparatus applied to the second electronic device provided in the present disclosure may further include: and the environment information sending module is used for sending the software tool development kit of the applet and the host environment information to the first electronic device.
The functions of the modules in the apparatuses in the embodiments of the present disclosure may refer to the corresponding descriptions in the above method embodiments, and are not described herein again.
In the technical scheme of the disclosure, the collection, storage, use, processing, transmission, provision, disclosure and other processing of the personal information of the related user are all in accordance with the regulations of related laws and regulations and do not violate the good customs of the public order.
The present disclosure also provides an applet debugging system, an electronic device, a non-transitory computer readable storage medium, and a computer program product according to embodiments of the present disclosure.
As shown in fig. 5, the applet debugging system provided in the present disclosure may execute the applet debugging method provided in the present disclosure, and the system includes: a first electronic device 501 and a second electronic device 502 that are communicatively connected.
The present disclosure provides an electronic device, as a first electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the applet debugging method applied to the first electronic device provided by any one of the embodiments of the disclosure.
The present disclosure also provides an electronic device, as a second electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the applet debugging method applied to the second electronic device provided by any one of the embodiments of the disclosure.
The present disclosure provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute a method for debugging an applet provided in any one embodiment of the present disclosure.
The computer program product provided by the present disclosure includes a computer program, which when executed by a processor implements the applet debugging method provided by any one of the embodiments of the present disclosure.
Fig. 6 shows a schematic block diagram of an example electronic device 600 (which may be either the first electronic device or the second electronic device) that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the apparatus 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)602 or a computer program loaded from a storage unit 608 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device 600 can also be stored. The calculation unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
A number of components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, a mouse, or the like; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 601 performs the respective methods and processes described above. For example, in some embodiments, the above-described methods may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 600 via the ROM 602 and/or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the above-described method in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (28)

1. An applet debugging method applied to a first electronic device, the method comprising:
acquiring a code packet of an applet sent by second electronic equipment, and analyzing the code packet to obtain a service code and a debugging code of the applet;
running the applet based on the service code;
acquiring abnormal information in the running process of the small program;
and calling the debugging code to debug the small program according to the abnormal information.
2. The applet debugging method according to claim 1, wherein the obtaining exception information during the applet running process includes:
acquiring abnormal information in the small program running process monitored by the second electronic equipment;
or monitoring the running process of the small program, and acquiring abnormal information when the running of the small program is abnormal.
3. The applet debugging method according to claim 1, wherein the invoking the debugging code to debug the applet comprises:
and calling the debugging code to print the abnormal information into an abnormal log, and debugging the small program according to the abnormal log.
4. The applet debugging method according to claim 3, wherein the invoking the debugging code to print the exception information as an exception log comprises:
calling a first part of codes in the debugging codes, and displaying the running state of the applet in a function page of the applet;
responding to the received printing instruction, calling a second part of codes in the debugging codes, and printing the abnormal information into an abnormal log in an abnormal log printing area of a debugging page; the printing instruction is obtained according to the input operation of the user for the running state.
5. The applet debugging method according to claim 3, wherein the invoking the debugging code to print the exception information as an exception log comprises:
and responding to the monitored abnormal information, calling a second part of codes in the debugging codes, and printing the abnormal information into an abnormal log in an abnormal log printing area of a debugging page.
6. The applet debugging method according to claim 4 or 5, further comprising:
and responding to the update of the server address in the debugging page, calling a third part of codes in the debugging codes, and updating the variable acquired by the interface request of the applet into the variable corresponding to the server address.
7. The applet debugging method according to any one of claims 1 to 5, wherein the exception information includes at least one of exception information of an end capability, exception information of an interface, and exception information of a script language.
8. The applet debugging method according to any one of claims 3-5, further comprising:
acquiring a software tool development kit and host environment information of the applet, which are sent by second electronic equipment;
the debugging the applet according to the exception log comprises:
and responding to the received debugging instruction, and debugging the applet according to the abnormal log, the software tool development kit and the host environment information.
9. An applet debugging method applied to a second electronic device, the method comprising:
sending a code packet of the applet to the first electronic device; the code packet comprises a service code and a debugging code of the applet, and the debugging code is used for debugging the applet.
10. The applet debugging method according to claim 9, further comprising:
and monitoring the running process of the small program, and sending abnormal information to the first electronic equipment when the abnormal running of the small program is monitored.
11. The applet debugging method according to claim 9, further comprising:
and sending the software tool development kit and the host environment information of the small program to the first electronic device.
12. An applet debugging method comprising:
the second electronic equipment sends a code packet of the applet to the first electronic equipment;
the method comprises the steps that first electronic equipment obtains a code packet of an applet sent by second electronic equipment, and the code packet is analyzed to obtain a service code and a debugging code of the applet;
the first electronic equipment runs the small program based on the service code to acquire abnormal information in the running process of the small program;
and the first electronic equipment calls the debugging code to debug the applet according to the abnormal information.
13. An applet debugging apparatus applied to a first electronic device, the apparatus comprising:
the code acquisition module is used for acquiring a code packet of the applet sent by the second electronic equipment and analyzing the code packet to obtain a service code and a debugging code of the applet;
a program running module for running the applet based on the service code;
the abnormal information acquisition module is used for acquiring abnormal information in the running process of the small program;
and the debugging module is used for calling the debugging code to debug the small program according to the abnormal information.
14. The applet debugging apparatus according to claim 13, wherein the exception information obtaining module is specifically configured to:
acquiring abnormal information in the small program running process monitored by the second electronic equipment;
or monitoring the running process of the small program, and acquiring abnormal information when the running of the small program is abnormal.
15. The applet debugging apparatus according to claim 13, wherein the debugging module is specifically configured to:
and calling the debugging code to print the abnormal information into an abnormal log, and debugging the small program according to the abnormal log.
16. The applet debugging apparatus according to claim 15, wherein the debugging module is specifically configured to:
calling a first part of codes in the debugging codes, and displaying the running state of the applet in a function page of the applet;
responding to the received printing instruction, calling a second part of codes in the debugging codes, and printing the abnormal information into an abnormal log in an abnormal log printing area of a debugging page; the printing instruction is obtained according to the input operation of the user for the running state.
17. The applet debugging apparatus according to claim 15, wherein the debugging module is specifically configured to:
and responding to the monitored abnormal information, calling a second part of codes in the debugging codes, and printing the abnormal information into an abnormal log in an abnormal log printing area of a debugging page.
18. The applet debugging apparatus according to claim 16 or 17, further comprising:
and the interface variable updating module is used for responding to the update of the server address in the debugging page, calling a third part of codes in the debugging codes and updating the variable acquired by the interface request of the applet into the variable corresponding to the server address.
19. The applet debugging apparatus according to any one of claims 13 to 17, wherein the exception information includes at least one of exception information of an end capability, exception information of an interface, and exception information of a script language.
20. The applet debugging apparatus according to any one of claims 15-17, further comprising:
the environment information acquisition module is used for acquiring the software tool development kit and the host environment information of the applet;
the debugging module is specifically configured to: and responding to the received debugging instruction, and debugging the applet according to the abnormal log, the software tool development kit and the host environment information.
21. An applet debugging apparatus applied to a second electronic device, the apparatus comprising:
the code packet sending module is used for sending a code packet of the applet to the first electronic equipment; the code packet comprises a service code and a debugging code of the applet, and the debugging code is used for debugging the applet.
22. The applet debugging apparatus according to claim 21, further comprising:
and the abnormal information sending module is used for monitoring the running process of the small program and sending abnormal information to the first electronic equipment when the abnormal running of the small program is monitored.
23. The applet debugging apparatus according to claim 21, further comprising:
and the environment information sending module is used for sending the software tool development kit and the host environment information of the applet to the first electronic device.
24. An electronic apparatus, as a first electronic apparatus, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the applet debugging method of any one of claims 1-8.
25. An electronic device, as a second electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the applet debugging method of any one of claims 9-11.
26. An applet debugging system comprising: the method comprises the steps of communicatively connecting a first electronic device and a second electronic device;
the first electronic device is an electronic device according to claim 24, and the second electronic device is an electronic device according to claim 25.
27. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform: the applet debugging method according to any one of claims 1 to 8, or the applet debugging method according to any one of claims 9 to 11.
28. A computer program product comprising a computer program which, when executed by a processor, implements: the applet debugging method according to any one of claims 1 to 8, or the applet debugging method according to any one of claims 9 to 11.
CN202111601614.1A 2021-12-24 2021-12-24 Applet debugging method, device, equipment, medium and computer program product Pending CN114356759A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111601614.1A CN114356759A (en) 2021-12-24 2021-12-24 Applet debugging method, device, equipment, medium and computer program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111601614.1A CN114356759A (en) 2021-12-24 2021-12-24 Applet debugging method, device, equipment, medium and computer program product

Publications (1)

Publication Number Publication Date
CN114356759A true CN114356759A (en) 2022-04-15

Family

ID=81101760

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111601614.1A Pending CN114356759A (en) 2021-12-24 2021-12-24 Applet debugging method, device, equipment, medium and computer program product

Country Status (1)

Country Link
CN (1) CN114356759A (en)

Similar Documents

Publication Publication Date Title
CN105159833A (en) Automatic testing device and method
US20180159724A1 (en) Automatic task tracking
CN107608901B (en) Jmeter-based testing method and device, storage medium and electronic equipment
CN112035344A (en) Multi-scenario test method, device, equipment and computer readable storage medium
CN114356759A (en) Applet debugging method, device, equipment, medium and computer program product
CN113010827A (en) Page rendering method and device, electronic equipment and storage medium
CN112925583A (en) Host application capability expansion method, device, equipment and storage medium
CN111930478A (en) Service calling method and device based on dynamic bytecode
CN113282444A (en) Visualization method and device for business process debugging
CN114327577A (en) Code change determining method and device, electronic equipment and storage medium
CN113515462A (en) Method, device, equipment and storage medium for testing
CN114090365A (en) Method, device and equipment for performing function test by using dynamic link library
CN114003497A (en) Method, device and equipment for testing service system and storage medium
CN115269431A (en) Interface testing method and device, electronic equipment and storage medium
CN113407844A (en) Version recommendation method, device and equipment of applet framework and storage medium
CN113360144A (en) Auxiliary processing method, device, storage medium and program product for software development
CN112948245A (en) Element debugging method, device, equipment, storage medium and program product
CN114691517A (en) Test method, device, equipment and storage medium
CN112860356A (en) API call control method and device, electronic equipment and storage medium
CN114647419A (en) Service deployment processing method and device, electronic equipment and storage medium
CN113434396A (en) Interface test method, device, equipment, storage medium and program product
CN113760769A (en) Test case processing method and device, electronic equipment and storage medium
CN113360330A (en) Concurrent lock testing method, related device and computer program product
CN113656296A (en) Code testing method and device, electronic equipment and storage medium
CN114238149A (en) Batch testing method of accounting system, electronic device and storage medium

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