CN111338968A - Project function module debugging method, device, medium and electronic equipment - Google Patents
Project function module debugging method, device, medium and electronic equipment Download PDFInfo
- Publication number
- CN111338968A CN111338968A CN202010211344.2A CN202010211344A CN111338968A CN 111338968 A CN111338968 A CN 111338968A CN 202010211344 A CN202010211344 A CN 202010211344A CN 111338968 A CN111338968 A CN 111338968A
- Authority
- CN
- China
- Prior art keywords
- debugging
- module
- target
- function module
- debugged
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 53
- 230000001419 dependent effect Effects 0.000 claims description 46
- 238000004590 computer program Methods 0.000 claims description 9
- 230000010354 integration Effects 0.000 abstract 1
- 230000006870 function Effects 0.000 description 158
- 238000010586 diagram Methods 0.000 description 15
- 238000004364 calculation method Methods 0.000 description 10
- 238000004891 communication Methods 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000012360 testing method Methods 0.000 description 4
- 238000011161 development Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 239000002699 waste material Substances 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 230000002776 aggregation Effects 0.000 description 1
- 238000004220 aggregation Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000003252 repetitive effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/362—Software debugging
- G06F11/3644—Software debugging by instrumenting at runtime
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the application provides a project function module debugging method, a project function module debugging device, a computer readable medium and electronic equipment, and relates to the technical field of computers; the item comprises a plurality of functional modules, including: adding a debugging module in the project, wherein the debugging module comprises configuration information; reading configuration information in a debugging module; determining a target function module to be debugged according to the configuration information; acquiring debugging resources corresponding to the target function module, and generating an application program to be debugged according to the debugging resources; and debugging the application program. The technical scheme of the embodiment of the application overcomes the problem of low debugging efficiency at least to a certain extent, and the information of a debugging target can be realized through the integration of the debugging module, and the resource is called and debugged through the information, so that the function debugging efficiency can be improved.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method for debugging a function module of an item, an apparatus for debugging a function module of an item, a computer-readable medium, and an electronic device.
Background
In the field of software engineering, it is generally necessary to debug functions in developed software to ensure that the software can realize the functions that it should have before coming online. Generally, a developer is required to determine a code part needing debugging through an error report result of running software so as to debug the engineering. However, the software project usually contains a large amount of code, and the traditional way of debugging through the result of running the software is easy to cause the problem of low debugging efficiency.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present application and therefore may include information that does not constitute prior art known to a person of ordinary skill in the art.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method for debugging a function module of a project, a device for debugging a function module of a project, a computer-readable medium, and an electronic device, which overcome the problem of low debugging efficiency at least to a certain extent, integrate information that can achieve a debugging target through a debugging module, and perform resource calling and debugging through the information, thereby improving the function debugging efficiency.
A first aspect of an embodiment of the present application provides a method for debugging a function module of a project, including:
adding a debugging module in the project, wherein the debugging module comprises configuration information;
reading configuration information in a debugging module;
determining a target function module to be debugged according to the configuration information;
acquiring debugging resources corresponding to the target function module, and generating an application program to be debugged according to the debugging resources;
and debugging the application program.
In an exemplary embodiment of the present application, reading configuration information in a debug module includes:
reading configuration information for representing a debugging target from a root directory of a debugging module; the root directory comprises files corresponding to the functional modules and files corresponding to the debugging modules, and the files corresponding to the debugging modules are used for storing configuration information and debugging resources.
In an exemplary embodiment of the present application, the debugging resources include dependent resources, and acquiring the debugging resources corresponding to the target function module includes:
determining a dependent function module which a target function module depends on according to the configuration information;
and acquiring the dependent resources corresponding to the dependent function modules.
In an exemplary embodiment of the present application, generating an application to be debugged according to a debugging resource includes:
acquiring directory information corresponding to a target function module; the directory information is used for representing a calling path corresponding to the target function module;
and generating the application program to be debugged according to the directory information and the dependent resources.
In an exemplary embodiment of the present application, debugging an application includes:
running the application program to be debugged to obtain and output a running result; the operation result comprises an operation error report of the application program to be debugged;
and debugging the target function module according to the operation result.
In an exemplary embodiment of the present application, debugging a target function module according to a running result includes:
detecting whether the operation result meets a debugging target; the debugging target is used for limiting an ideal operation result of the application program to be debugged;
if the debugging target is not met, debugging the target function module according to the operation error report; and if the debugging target is met, outputting prompt information for indicating that the target functional module does not need to be debugged.
In an exemplary embodiment of the present application, the method may further include the steps of:
detecting whether statement information which corresponds to a debugging target and is used for limiting a target functional module not to participate in debugging exists;
if the declaration information does not exist, executing the application program to be debugged generated according to the target function module;
if the declaration information exists, determining other functional modules except the target functional module in the functional modules; generating an application program to be debugged according to other functional modules; and debugging other functional modules according to the running result of the application program to be debugged.
According to a second aspect of the embodiments of the present application, there is provided a function module debugging apparatus for an item, the item including a plurality of function modules, the apparatus including a module adding unit, an information reading unit, a function module determining unit, an application generating unit, and a debugging unit, wherein:
the module adding unit is used for adding a debugging module in the project, and the debugging module comprises configuration information;
the information reading unit is used for reading the configuration information in the debugging module;
the function module determining unit is used for determining a target function module to be debugged according to the configuration information;
the application program generating unit is used for acquiring debugging resources corresponding to the target function module and generating an application program to be debugged according to the debugging resources;
and the debugging unit is used for debugging the application program.
In an exemplary embodiment of the present application, the reading of the configuration information in the debug module by the information reading unit includes:
the information reading unit reads configuration information used for representing a debugging target from a root directory of the debugging module; the root directory comprises files corresponding to the functional modules and files corresponding to the debugging modules, and the files corresponding to the debugging modules are used for storing configuration information and debugging resources.
In an exemplary embodiment of the present application, the debugging resources include dependent resources, and the acquiring, by the application generating unit, the debugging resources corresponding to the target function module includes:
the application program generating unit determines a dependent function module which the target function module depends on according to the configuration information;
the application program generating unit acquires the dependent resources corresponding to the dependent function modules.
In an exemplary embodiment of the present application, the generating unit of the application program generates the application program to be debugged according to the debugging resource, including:
the application program generating unit acquires the directory information corresponding to the target function module; the directory information is used for representing a calling path corresponding to the target function module;
and the application program generating unit generates the application program to be debugged according to the directory information and the dependent resources.
In an exemplary embodiment of the present application, the debugging unit debugs the application program, including:
the debugging unit operates the application program to be debugged to obtain an operation result and output the operation result; the operation result comprises an operation error report of the application program to be debugged;
and the debugging unit debugs the target function module according to the operation result.
In an exemplary embodiment of the present application, the debugging unit debugging the target function module according to the execution result includes:
the debugging unit detects whether the operation result meets a debugging target or not; the debugging target is used for limiting an ideal operation result of the application program to be debugged;
if the debugging target is not met, the debugging unit debugs the target function module according to the running error report; if the debugging target is met, the debugging unit outputs prompt information for indicating that the target functional module does not need to be debugged.
In an exemplary embodiment of the present application, the apparatus may further include a declaration information detecting unit, wherein:
a declaration information detecting unit for detecting whether declaration information corresponding to a debugging target for restricting the target function module not to participate in debugging exists;
the application program generating unit is specifically used for generating an application program to be debugged according to the target function module when the declaration information detecting unit detects that the declaration information does not exist;
the debugging unit is also used for determining other functional modules except the target functional module in the functional modules when the statement information detection unit detects that the statement information exists; generating an application program to be debugged according to other functional modules; and debugging other functional modules according to the running result of the application program to be debugged.
According to a third aspect of embodiments of the present application, there is provided a computer-readable medium having stored thereon a computer program which, when executed by a processor, implements the method of debugging a functional module as described in the first aspect of the embodiments above.
According to a fourth aspect of embodiments of the present application, there is provided an electronic apparatus, including: one or more processors; storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out a method of debugging a functional module of an item as described in the first aspect of the embodiments above.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
in the technical solutions provided in some embodiments of the present application, a debugging module may be added to a project, where the debugging module includes configuration information, and then the configuration information in the debugging module is read. Further, the target function module to be debugged may be determined according to the configuration information. Furthermore, the debugging resources corresponding to the target function module can be obtained, and the application program to be debugged can be generated according to the debugging resources. Further, the application can be debugged. The method and the device can integrate information capable of realizing debugging targets through the debugging module, and carry out resource calling and debugging through the information, thereby improving the function debugging efficiency; on the other hand, the method and the device can be used for debugging a certain function in the software in a targeted manner, the specific debugging of the certain function is not required to be realized by operating the whole project, the calculation amount of the CPU can be reduced, and the calculation efficiency is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
Fig. 1 is a schematic diagram schematically illustrating an exemplary system architecture to which a method for debugging a function module of an item and a device for debugging a function module of an item according to an embodiment of the present application can be applied;
FIG. 2 schematically illustrates a block diagram of a computer system suitable for use in implementing an electronic device of an embodiment of the present application;
FIG. 3 schematically shows a flow diagram of a method of debugging a functional module of an item according to an embodiment of the application;
FIG. 4 schematically shows a flow diagram of a method of debugging a functional module of an item according to another embodiment of the present application;
FIG. 5 schematically shows a block diagram of a method of functional block debugging of an item according to an embodiment of the present application;
fig. 6 schematically shows a block diagram of a functional module debugging apparatus according to an item in an embodiment of the present application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the subject matter of the present application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present application.
Furthermore, the drawings are merely schematic illustrations of the present application and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
Fig. 1 is a schematic diagram illustrating a system architecture of an exemplary application environment to which a method for debugging a functional module of an item and a device for debugging a functional module of an item according to an embodiment of the present application can be applied.
As shown in fig. 1, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few. The terminal devices 101, 102, 103 may be various electronic devices having a display screen, including but not limited to desktop computers, portable computers, smart phones, tablet computers, and the like. It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. For example, server 105 may be a server cluster comprised of multiple servers, or the like.
FIG. 2 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
It should be noted that the computer system 200 of the electronic device shown in fig. 2 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 2, the computer system 200 includes a Central Processing Unit (CPU)201 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)202 or a program loaded from a storage section 208 into a Random Access Memory (RAM) 203. In the (RAM)203, various programs and data necessary for system operation are also stored. The (CPU)201, (ROM)202, and (RAM)203 are connected to each other by a bus 204. An input/output (I/O) interface 205 is also connected to bus 204.
The following components are connected to the (I/O) interface 205: an input portion 206 including a keyboard, a mouse, and the like; an output section 207 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 208 including a hard disk and the like; and a communication section 209 including a network interface card such as a LAN card, a modem, or the like. The communication section 209 performs communication processing via a network such as the internet. The driver 210 is also connected to the (I/O) interface 205 as necessary. A removable medium 211 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 210 as necessary, so that a computer program read out therefrom is mounted into the storage section 208 as necessary.
In particular, according to embodiments of the present application, the processes described below with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 209 and/or installed from the removable medium 211. The computer program, when executed by a Central Processing Unit (CPU)201, performs various functions defined in the methods and apparatus of the present application.
It should be noted that the computer readable medium shown in the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by an electronic device, cause the electronic device to implement the method as described in the embodiments below. For example, the electronic device may implement the steps shown in fig. 3 and 4, and so on.
Generally, in the development process of an android modular component, a project divides different component modules according to different aggregation functions and different levels of granularity, in a collaborative development mode, the modules are usually developed iteratively by different developers, and functions in a project need to be debugged in the development process. Specifically, a plug-in needs to be defined first, used in a module that needs to be debugged independently, and a resource file needed for debugging operation needs to be added in an execution directory. The method can only rely on the compiling main terminal to run the application for testing, the compiling time is long, and the problem of low debugging efficiency is easily caused.
In view of one or more of the above problems, the present example embodiment provides a method of debugging a function module of an item. Referring to fig. 3, the method for debugging a function module of the item may include the following steps S310 to S350, specifically:
step S310: a debugging module is added in the project, and the debugging module comprises configuration information.
Step S320: and reading the configuration information in the debugging module.
Step S330: and determining a target function module to be debugged according to the configuration information.
Step S340: and acquiring debugging resources corresponding to the target function module, and generating an application program to be debugged according to the debugging resources.
Step S350: and debugging the application program.
By implementing the project function module debugging method shown in fig. 3, the plug-in of the original module can be prevented from being changed by intrusion through the newly added debugging module, and the compatibility of the third-party plug-in is improved. In addition, all debugging information can be integrated into the debugging module, so that the debugging information is convenient to maintain, and the function of debugging the multi-module component by a single module is realized.
The above steps of the present exemplary embodiment will be described in more detail below.
In step S310, a debugging module is added to the project, and the debugging module includes configuration information.
Wherein the project is represented by a code in the project. The debugging module can be an application level module, and also comprises debugging resources, a root directory and debugging codes corresponding to the debugging resources; the root directory further includes a configuration script, the name of the configuration script may be debug, the configuration script is used to define directory information corresponding to the debugging function (for example, a code included in the a debugging function is placed in a com/debug/a directory), the configuration script is also used to define dependency information required by the debugging function (for example, a third party library on which the debugging code of the a debugging function needs to depend), and the configuration script is also used to declare which functions the debugging module selects for debugging (for example, targetFunction: "a, B", that is, to indicate that the a debugging function and the B debugging function are debugged at the same time). In addition, the configuration information is used to define the functional modules needed to complete the project.
In step S320, the configuration information in the debug module is read.
In this embodiment of the present application, optionally, reading configuration information in the debugging module includes:
reading configuration information for representing a debugging target from a root directory of a debugging module; the root directory comprises files corresponding to the functional modules and files corresponding to the debugging modules, and the files corresponding to the debugging modules are used for storing configuration information and debugging resources.
The file corresponding to each functional module may include an execution code and a call path corresponding to each functional module, and the functional module may be a library-level module. In addition, each functional module includes a target functional module for realizing the debugging target and other functional modules not realizing the debugging target.
Therefore, the optional embodiment can be implemented to obtain the configuration information, so that the application program corresponding to the function to be debugged can be generated according to the configuration information, the debugging cost is reduced, and the debugging efficiency is improved.
In step S330, a target function module to be debugged is determined according to the configuration information.
The number of the target functional modules may be one or more, and the embodiments of the present application are not limited. In addition, the method for determining the target function module to be debugged according to the configuration information may specifically be: and reading module information used for representing the debugging purpose in the configuration information, and determining a target function module to be debugged, which is limited by the module information, from each function module.
In step S340, a debug resource corresponding to the target function module is obtained, and an application program to be debugged is generated according to the debug resource.
In this embodiment of the present application, optionally, the debugging resources include dependent resources, and acquiring the debugging resources corresponding to the target function module includes:
determining a dependent function module which a target function module depends on according to the configuration information;
and acquiring the dependent resources corresponding to the dependent function modules.
The dependent resource includes a call path corresponding to the dependent function module, and the dependent function module may be one or more of the above other function modules that do not achieve the debugging target, which is not limited in this embodiment of the application. In addition, after obtaining the dependent resource corresponding to the dependent function module, the method may further include the following steps: adding a dependent resource to the test unit so that the dependent resource can participate in debugging and compiling; wherein, the test unit can be an android test unit.
Therefore, by implementing the optional embodiment, the target function module for realizing the debugging target and the dependent function module related to the target function module can be automatically called, so that the aim of accurately realizing the debugging of the generated application program is facilitated.
In this embodiment, optionally, generating the application program to be debugged according to the debugging resource includes:
acquiring directory information corresponding to a target function module; the directory information is used for representing a calling path corresponding to the target function module;
and generating the application program to be debugged according to the directory information and the dependent resources.
After obtaining the directory information corresponding to the target function module, the method may further include the following steps: adding the directory information and the dependent resources into the main configuration of the project to participate in default compilation, and executing the application program to be debugged according to the directory information and the dependent resources; the data storage structure in the subject configuration comprises a Name attribute, the Name attribute is a default subject of the project, and default compiling is to call default subject resources for compiling.
Therefore, by implementing the optional embodiment, the application program to be debugged can be generated through the calling path of the target function module and the dependent resource related to the target function module, so that the debugging difficulty caused by the fact that the whole project needs to be debugged due to the fact that a certain function needs to be debugged is reduced, the function debugging efficiency is further improved, and the calculation amount of a CPU is reduced.
In step S350, the application is debugged.
In this embodiment of the present application, optionally, debugging the application program includes:
running the application program to be debugged to obtain and output a running result; the operation result comprises an operation error report of the application program to be debugged;
and debugging the target function module according to the operation result.
The operation error report is used to indicate an operation problem occurring when the application program is operated, and the format of the application program may be aar or apk, which is not limited in the embodiment of the present application. Specifically, if the target function module is an application level module, the format of the application program is apk; if the target function module is a library-level module, the format of the application program is aar.
In addition, optionally, the mode of running the application program to be debugged may specifically be: and running the application program to be debugged according to the debugging code.
Therefore, by implementing the optional embodiment, the target function module can be debugged through the operation result, the whole project is not required to be debugged, and the debugging efficiency can be improved.
Further, debugging the target function module according to the operation result comprises:
detecting whether the operation result meets a debugging target; the debugging target is used for limiting an ideal operation result of the application program to be debugged;
if the debugging target is not met, debugging the target function module according to the operation error report; and if the debugging target is met, outputting prompt information for indicating that the target functional module does not need to be debugged.
The method for debugging the target function module according to the operation error report may specifically be: and reporting the running result, detecting the code editing operation, and changing the code resource corresponding to the target function module according to the code editing operation so as to realize the debugging of the target function module.
Therefore, by implementing the optional embodiment, the target function module can be debugged or prompt information can be output according to the judgment standard of whether the operation result meets the debugging target, so that the aim of targeted debugging is fulfilled, and the waste of computing power is reduced.
In this embodiment of the present application, optionally, the method may further include the following steps:
detecting whether statement information which corresponds to a debugging target and is used for limiting a target functional module not to participate in debugging exists;
if the declaration information does not exist, executing the application program to be debugged generated according to the target function module;
if the declaration information exists, determining other functional modules except the target functional module in the functional modules; generating an application program to be debugged according to other functional modules; and debugging other functional modules according to the running result of the application program to be debugged.
The declaration information is used for declaring a mode for achieving a debugging purpose, the declaration information can be used for limiting debugging of all other functional modules except the target functional module, and the generated application program is composed of other functional modules under the condition that the declaration information exists.
Therefore, the implementation of the optional embodiment can realize the debugging purpose more accurately through the declaration information, and the debugging efficiency is improved.
Referring to fig. 4, fig. 4 schematically shows a flow chart of a method for debugging a functional module of an item according to another embodiment of the present application. As shown in fig. 4, a function module debugging method of an item of another embodiment includes: step S410 to step S480, wherein:
step S410: reading configuration information for representing a debugging target from a root directory of a debugging module; the root directory comprises files corresponding to the functional modules and files corresponding to the debugging modules, and the files corresponding to the debugging modules are used for storing configuration information and debugging resources.
Step S420: and determining a target function module to be debugged according to the configuration information.
Step S430: determining a dependent function module which a target function module depends on according to the configuration information; acquiring a dependency resource corresponding to the dependency function module; debug resources include dependent resources.
Step S440: acquiring directory information corresponding to a target function module; the directory information is used for representing a calling path corresponding to the target function module; and generating the application program to be debugged according to the directory information and the dependent resources.
Step S450: running the application program to be debugged to obtain and output a running result; and the running result comprises a running error report of the application program to be debugged.
Step S460: detecting whether the operation result meets a debugging target; the debugging target is used for limiting an ideal operation result of the application program to be debugged; if the debugging target is not satisfied, executing step S470; if the debugging target is satisfied, step S480 is executed.
Step S470: and debugging the target function module according to the operation error report.
Step S480: and outputting prompt information for indicating that the target functional module does not need debugging.
It should be noted that steps S410 to S480 correspond to the steps and embodiments shown in fig. 3, and for the specific implementation of steps S410 to S480, please refer to the steps and embodiments shown in fig. 3, which are not described herein again.
Therefore, by implementing the method for debugging the functional module of the project shown in fig. 4, the information capable of realizing the debugging target can be integrated by the debugging module, and the resource can be called and debugged by the information, so that the function debugging efficiency can be improved. In addition, the method and the device can be used for debugging a certain function in the software in a targeted manner, the debugging of the specific certain function is not required to be realized by operating the whole project, the calculation amount of the CPU can be reduced, and the calculation efficiency is improved.
Referring to fig. 5, fig. 5 schematically shows a module diagram of a method for debugging a functional module of an item according to an embodiment of the present application. Specifically, the server may read configuration information 5061 for characterizing a debug target from a root directory of the debug module (application level) 506, and then determine a target functional module to be debugged according to a function to be debugged defined by the configuration information 5061; among them, the functions to be debugged may include [ function a: { dependency module a, directory com/debug/a } ]501, [ function B: { dependency module B, directory com/debug/B } ]502, … …; the target function modules may be a master (application level) 503, a module a (library level) 504, and a module B (library level) 505, … …. Furthermore, the plug-in 507 may determine, according to the configuration information 5061 and the debug resource 5062, a dependent function module on which the target function module depends, and obtain a dependent resource corresponding to the dependent function module; the dependent function modules may be a main terminal (application level) 503, a module a (library level) 504, and a module B (library level) 505 and … …. Furthermore, the plug-in 507 may obtain directory information corresponding to the target function module, and the android builder 508 may generate an application to be debugged according to the directory information and the dependent resource, where the application may be an application apk (function a)509 and applications apk510 and … …. Further, the application program to be debugged can be run and the target function module can be debugged according to the running result.
It can be seen that the module schematic diagram of the method for debugging a functional module of a project shown in fig. 5 can integrate information that can achieve a target of debugging through a debugging module, and perform resource calling and debugging through the information, thereby improving the efficiency of function debugging. In addition, the method and the device can be used for debugging a certain function in the software in a targeted manner, the debugging of the specific certain function is not required to be realized by operating the whole project, the calculation amount of the CPU can be reduced, and the calculation efficiency is improved.
Further, in the present exemplary embodiment, an apparatus for debugging a function module of an item is also provided. Referring to fig. 6, the function module debugging apparatus of this item may include a module adding unit 601, an information reading unit 602, a function module determining unit 603, an application generating unit 604, and a debugging unit 605, in which:
the module adding unit 601 is configured to add a debugging module to a project, where the debugging module includes configuration information;
an information reading unit 602, configured to read configuration information in the debugging module;
a function module determining unit 603, configured to determine a target function module to be debugged according to the configuration information;
an application program generating unit 604, configured to obtain a debugging resource corresponding to the target function module, and generate an application program to be debugged according to the debugging resource;
the debugging unit 605 is configured to debug the application program.
It can be seen that, in the function module debugging apparatus implementing the project shown in fig. 6, information that can achieve a target of debugging can be integrated by the debugging module, and resource calling and debugging are performed by the information, so that the function debugging efficiency can be improved. In addition, the method and the device can be used for debugging a certain function in the software in a targeted manner, the debugging of the specific certain function is not required to be realized by operating the whole project, the calculation amount of the CPU can be reduced, and the calculation efficiency is improved.
In an exemplary embodiment of the present application, the reading unit 602 reads configuration information in a debug module, including:
the information reading unit 602 reads configuration information for characterizing a debugging target from a root directory of a debugging module; the root directory comprises files corresponding to the functional modules and files corresponding to the debugging modules, and the files corresponding to the debugging modules are used for storing configuration information and debugging resources.
Therefore, the optional embodiment can be implemented to obtain the configuration information, so that the application program corresponding to the function to be debugged can be generated according to the configuration information, the debugging cost is reduced, and the debugging efficiency is improved.
In an exemplary embodiment of the present application, the debugging resources include dependent resources, and the obtaining, by the application generating unit 604, the debugging resources corresponding to the target function module includes:
the application generation unit 604 determines a dependent function module on which the target function module depends according to the configuration information;
the application generation unit 604 acquires a dependent resource corresponding to the dependent function module.
Therefore, by implementing the optional embodiment, the target function module for realizing the debugging target and the dependent function module related to the target function module can be automatically called, so that the aim of accurately realizing the debugging of the generated application program is facilitated.
In an exemplary embodiment of the present application, the application generating unit 604 generates the application to be debugged according to the debugging resource, including:
the application generating unit 604 obtains directory information corresponding to the target function module; the directory information is used for representing a calling path corresponding to the target function module;
the application generation unit 604 generates an application to be debugged from the directory information and the dependent resource.
Therefore, by implementing the optional embodiment, the application program to be debugged can be generated through the calling path of the target function module and the dependent resource related to the target function module, so that the debugging difficulty caused by the fact that the whole project needs to be debugged due to the fact that a certain function needs to be debugged is reduced, the function debugging efficiency is further improved, and the calculation amount of a CPU is reduced.
In an exemplary embodiment of the present application, the debugging unit 605 debugs the application program, including:
the debugging unit 605 runs the application program to be debugged, obtains a running result and outputs the running result; the operation result comprises an operation error report of the application program to be debugged;
the debugging unit 605 debugs the target function module according to the operation result.
Therefore, by implementing the optional embodiment, the target function module can be debugged through the operation result, the whole project is not required to be debugged, and the debugging efficiency can be improved.
In an exemplary embodiment of the present application, the debugging unit 605 debugs the target function module according to the operation result, including:
the debugging unit 605 detects whether the operation result satisfies a debugging target; the debugging target is used for limiting an ideal operation result of the application program to be debugged;
if the target is not satisfied, the debugging unit 605 debugs the target function module according to the operation error report; if the debug target is satisfied, debug unit 605 outputs hint information indicating that the target functional module does not need to be debugged.
Therefore, by implementing the optional embodiment, the target function module can be debugged or prompt information can be output according to the judgment standard of whether the operation result meets the debugging target, so that the aim of targeted debugging is fulfilled, and the waste of computing power is reduced.
In an exemplary embodiment of the present application, the apparatus may further include a declaration information detecting unit (not shown), wherein:
a declaration information detecting unit for detecting whether declaration information corresponding to a debugging target for restricting the target function module not to participate in debugging exists;
an application program generating unit 604, configured to generate an application program to be debugged according to the target function module when the declaration information detecting unit detects that the declaration information does not exist;
the debugging unit 605 is further configured to determine, when the declaration information detecting unit detects that the declaration information exists, other functional modules in the functional modules except for the target functional module; generating an application program to be debugged according to other functional modules; and debugging other functional modules according to the running result of the application program to be debugged.
Therefore, the implementation of the optional embodiment can realize the debugging purpose more accurately through the declaration information, and the debugging efficiency is improved.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
For details that are not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the method for debugging a functional module of an item described above in the present application for the details that are not disclosed in the embodiments of the apparatus of the present application.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.
Claims (10)
1. A method for debugging a function module of an item, wherein the item comprises a plurality of function modules, the method comprising:
adding a debugging module in the project, wherein the debugging module comprises configuration information;
reading the configuration information in the debugging module;
determining a target function module to be debugged according to the configuration information;
acquiring debugging resources corresponding to the target function module, and generating an application program to be debugged according to the debugging resources;
and debugging the application program.
2. The method of claim 1, wherein reading configuration information in the debug module comprises:
reading configuration information for representing a debugging target from a root directory of the debugging module; the root directory comprises files corresponding to the functional modules and files corresponding to the debugging modules, and the files corresponding to the debugging modules are used for storing the configuration information and the debugging resources.
3. The method according to claim 1, wherein the debugging resources include dependent resources, and acquiring the debugging resources corresponding to the target function module includes:
determining a dependent function module on which the target function module depends according to the configuration information;
and acquiring the dependent resources corresponding to the dependent function module.
4. The method of claim 3, wherein generating the application to be debugged according to the debugging resources comprises:
acquiring directory information corresponding to the target function module; the directory information is used for representing a calling path corresponding to the target function module;
and generating an application program to be debugged according to the directory information and the dependent resources.
5. The method of claim 1, wherein debugging the application comprises:
running the application program to be debugged to obtain a running result and outputting the running result; wherein the operation result comprises an operation error report of the application program to be debugged;
and debugging the target function module according to the operation result.
6. The method of claim 5, wherein debugging the target functional module according to the operation result comprises:
detecting whether the operation result meets a debugging target; the debugging target is used for limiting an ideal operation result of the application program to be debugged;
if the debugging target is not met, debugging the target functional module according to the operation error report; and if the debugging target is met, outputting prompt information for indicating that the target functional module does not need to be debugged.
7. The method of claim 1, further comprising:
detecting whether statement information corresponding to the debugging target and used for limiting the target functional module not to participate in debugging exists;
if the declaration information does not exist, executing the application program to be debugged according to the debugging resources;
if the declaration information exists, determining other functional modules except the target functional module in the functional modules; generating an application program to be debugged according to the other functional modules; and debugging the other functional modules according to the running result of the application program to be debugged.
8. A function module debugging apparatus for an item, wherein the item includes a plurality of function modules, the apparatus comprising:
the module adding unit is used for adding a debugging module in the project, and the debugging module comprises configuration information;
the information reading unit is used for reading the configuration information in the debugging module;
a function module determining unit, configured to determine a target function module to be debugged according to the configuration information;
the application program generating unit is used for acquiring debugging resources corresponding to the target function module and generating an application program to be debugged according to the debugging resources;
and the debugging unit is used for debugging the application program.
9. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out a method of debugging a functional module of an item according to any one of claims 1 to 7.
10. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out a method of debugging a functional module of an item as claimed in any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010211344.2A CN111338968A (en) | 2020-03-24 | 2020-03-24 | Project function module debugging method, device, medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010211344.2A CN111338968A (en) | 2020-03-24 | 2020-03-24 | Project function module debugging method, device, medium and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111338968A true CN111338968A (en) | 2020-06-26 |
Family
ID=71184436
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010211344.2A Pending CN111338968A (en) | 2020-03-24 | 2020-03-24 | Project function module debugging method, device, medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111338968A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112817862A (en) * | 2021-02-22 | 2021-05-18 | 北京奇艺世纪科技有限公司 | Data processing method, device and equipment and readable storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020087952A1 (en) * | 2000-12-28 | 2002-07-04 | Kabushiki Kaisha Toshiba | Debugger system and method of extending debug functions of a debugger system and debugger program product stored in a computer readable medium |
US20150135158A1 (en) * | 2013-11-14 | 2015-05-14 | Dimitar Tenev | Isolated testing of distributed development projects |
CN109471792A (en) * | 2018-09-26 | 2019-03-15 | 深圳壹账通智能科技有限公司 | Test control method and device, electronic equipment, medium |
CN110377523A (en) * | 2019-07-24 | 2019-10-25 | 网易(杭州)网络有限公司 | Program debugging method and device, electronic equipment and storage medium |
-
2020
- 2020-03-24 CN CN202010211344.2A patent/CN111338968A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020087952A1 (en) * | 2000-12-28 | 2002-07-04 | Kabushiki Kaisha Toshiba | Debugger system and method of extending debug functions of a debugger system and debugger program product stored in a computer readable medium |
US20150135158A1 (en) * | 2013-11-14 | 2015-05-14 | Dimitar Tenev | Isolated testing of distributed development projects |
CN109471792A (en) * | 2018-09-26 | 2019-03-15 | 深圳壹账通智能科技有限公司 | Test control method and device, electronic equipment, medium |
CN110377523A (en) * | 2019-07-24 | 2019-10-25 | 网易(杭州)网络有限公司 | Program debugging method and device, electronic equipment and storage medium |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112817862A (en) * | 2021-02-22 | 2021-05-18 | 北京奇艺世纪科技有限公司 | Data processing method, device and equipment and readable storage medium |
CN112817862B (en) * | 2021-02-22 | 2023-09-05 | 北京奇艺世纪科技有限公司 | Data processing method, device, equipment and readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106648945B (en) | Interface data testing method and device and electronic equipment | |
CN112104709B (en) | Intelligent contract processing method, device, medium and electronic equipment | |
US10360004B2 (en) | Using dynamic information to refine control flow graphs | |
CN110955409B (en) | Method and device for creating resources on cloud platform | |
CN111488573A (en) | Link library detection method and device, electronic equipment and computer readable storage medium | |
CN111597120A (en) | Interface test apparatus, method, electronic device, and computer-readable storage medium | |
CN111078230A (en) | Code generation method and device | |
CN112631590A (en) | Component library generation method and device, electronic equipment and computer readable medium | |
CN113419789A (en) | Method and device for generating data model script | |
CN111414154A (en) | Method and device for front-end development, electronic equipment and storage medium | |
CN111338968A (en) | Project function module debugging method, device, medium and electronic equipment | |
CN110688320A (en) | Global variable detection method and device and terminal equipment | |
CN113778451B (en) | File loading method, file loading device, computer system and computer readable storage medium | |
CN115269390A (en) | Automatic testing method and device for graphical interface and storage medium | |
CN111694729B (en) | Application testing method, device, electronic equipment and computer readable medium | |
CN113918444A (en) | Method, device, medium and electronic equipment for positioning collapse source code | |
CN111966592A (en) | Front-end page testing method, device, medium and electronic equipment | |
CN114356745A (en) | Software testing method and device, electronic equipment and computer readable storage medium | |
CN111880775A (en) | Multi-module layered architecture implementation method and device, electronic equipment and storage medium | |
CN117591104B (en) | Model generation method and device, electronic equipment and storage medium | |
TWI730384B (en) | Image testing method, device, computer device and readbale storage medium | |
CN113190453A (en) | User interface testing method, device, server and medium | |
CN118606123A (en) | Method, device, system, equipment and storage medium for generating test configuration file | |
CN115421773A (en) | Interface inspection method, device, equipment and medium based on gitlab | |
CN117271301A (en) | Test method, test device, electronic equipment and 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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200626 |