A debugging method, debugging device and computing device for application program controls

By embedding the control prompts the code in the source code file and testing the controls in the application interface, the problem of locating abnormal controls in software debugging is solved, which improves debugging efficiency and reduces the limitations of tool adaptation.

CN114880231BActive Publication Date: 2025-07-01UNIONTECH SOFTWARE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210540606.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-07
Publication Date
2025-07-01
Estimated Expiration
2042-03-07

AI Technical Summary

Technical Problem

During software debugging, it is difficult for developers to quickly and accurately locate the location of exception controls in the code file, resulting in ineffective debugging. The prior art software debugging tools need to match the compiler version and system environment, resulting in great limitations in the tool.

Method used

By burying the prompt code corresponding to each control in the source code file, build the application and test the control in the application interface to determine the exception control. In response to a predetermined operation of the exception control, the corresponding prompt code is executed to display the prompt information, thereby quickly positioning the exception control in the source code file.

Benefits of technology

It realizes rapid positioning of exception controls in the application interface, improves debugging efficiency, and avoids tool adaptation problems caused by changes in compiler version and system environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114880231B_ABST
    Figure CN114880231B_ABST
Patent Text Reader

Abstract

The present invention discloses a debugging method, a debugging device and a computing device for application program controls. The method is executed in a computing device and includes the steps of: obtaining a preprocessed source code file, and constructing an application program based on the preprocessed source code file, wherein the preprocessed source code file includes one or more control objects and prompt codes corresponding to each control object, and the interface of the application program includes controls corresponding to each control object; testing each control in the application program interface to determine one or more abnormal controls in the application program interface; in response to a predetermined operation on an abnormal control, executing the prompt code corresponding to the abnormal control to display corresponding prompt information within a predetermined range of the abnormal control, so as to locate the control object corresponding to the abnormal control in the preprocessed source code file based on the prompt information. According to the technical solution of the present invention, the control object corresponding to the abnormal control can be quickly located.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of invention patent application 2022102142779 filed on March 7, 2022. Technical Field

[0002] The present invention relates to the technical field of computer and software debugging, and in particular to a debugging method, a debugging device and a computing device for an application control. Background Art

[0003] In existing graphical operating systems, developers often need to integrate a large number of control units in the software. However, when testing the software, developers can only submit bug reports to developers based on the display of the interface. Faced with a large number of control unit objects in the code file, developers or subsequent maintenance personnel often cannot quickly and accurately locate the control object of the abnormal control in the code file, resulting in a lot of time spent in this link.

[0004] There is a software debugging tool in the prior art that captures the debugging information pre-embedded by the compiler during the compilation phase and automatically modifies the machine code of the executable file to generate the Tool Tip execution code of the control object, and then displays the marked content in the subsequent debugging process. However, with this technical solution, the generation of machine code and debugging information depends on the compiler version and system environment at the time. When the compiler is upgraded or the system environment is changed, the corresponding software debugging tool also needs to be upgraded and adapted, resulting in certain limitations in the software debugging tool written each time.

[0005] Therefore, a method for debugging an application control is needed to solve the problems existing in the above technical solutions. Summary of the invention

[0006] To this end, the present invention provides a debugging method and a debugging device for an application control, in an effort to solve or at least alleviate the above problems.

[0007] According to one aspect of the present invention, there is provided a method for debugging application program controls, which is executed in a computing device and includes the steps of: obtaining a preprocessed source code file, and building an application program based on the preprocessed source code file, wherein the preprocessed source code file includes one or more control objects and prompt codes corresponding to each control object, and the interface of the application program includes controls corresponding to each control object; testing each control in the application program interface to determine one or more abnormal controls in the application program interface; and in response to a predetermined operation on an abnormal control, executing the prompt code corresponding to the abnormal control to display corresponding prompt information within a predetermined range of the abnormal control, so as to locate the control object corresponding to the abnormal control in the preprocessed source code file based on the prompt information.

[0008] Optionally, in the method for debugging application program controls according to the present invention, the response to a predetermined operation on an abnormal control includes: responding to an operation in which the mouse pointer hovers over the abnormal control for a predetermined time.

[0009] Optionally, in the method for debugging application program controls according to the present invention, the prompt information includes the object identifier name corresponding to the abnormal control.

[0010] Optionally, in the method for debugging application program controls according to the present invention, before obtaining the preprocessed source code file, it includes the steps of: obtaining one or more source code files corresponding to the application program; determining all control objects in each source code file; and inserting prompt codes corresponding to each control object into the source code file to obtain the preprocessed source code file.

[0011] Optionally, in the method for debugging application program controls according to the present invention, the step of inserting prompt codes corresponding to each control object into the source code file includes: obtaining the code position where each control object first applies for memory; and based on the code position where each control object first applies for memory, inserting the prompt code corresponding to the control object into the source code file to obtain the preprocessed source code file.

[0012] Optionally, in the method for debugging application program controls according to the present invention, the step of obtaining one or more source code files corresponding to the application program includes: obtaining one or more source code file paths corresponding to the application program; and obtaining the corresponding source code files based on each source code file path.

[0013] Optionally, in the method for debugging application program controls according to the present invention, the step of determining all control objects in each source code file includes: traversing each source code file, locating each control object in the source code file, and marking each control object.

[0014] Optionally, in the debugging method of the application control according to the present invention, the prompt code is a code for executing a ToolTip operation.

[0015] According to one aspect of the present invention, there is provided a debugging apparatus, which resides in a computing device and includes: a construction module, adapted to obtain a preprocessed source code file and to construct an application based on the preprocessed source code file, wherein the preprocessed source code file includes one or more control objects and a prompt code corresponding to each control object, and the interface of the application includes a control corresponding to each control object; a testing module, adapted to test each control in the application interface to determine one or more abnormal controls in the application interface; and a prompt module, adapted to execute the prompt code corresponding to the abnormal control in response to a predetermined operation on the abnormal control to display corresponding prompt information within a predetermined range of the abnormal control, so as to locate the control object corresponding to the abnormal control in the preprocessed source code file based on the prompt information.

[0016] According to one aspect of the present invention, there is provided a computing device, comprising: at least one processor; and a memory storing program instructions, wherein the program instructions are configured to be suitable for execution by the at least one processor, and the program instructions include instructions for executing the debugging method of the application control as described above.

[0017] According to one aspect of the present invention, a readable storage medium storing program instructions is provided. When the program instructions are read and executed by a computing device, the computing device executes the method described above.

[0018] According to the technical solution of the present invention, a method for debugging application controls is provided, which builds an application based on a preprocessed source code file obtained by pre-embedding a prompt code corresponding to each control in a source code file, and determines each abnormal control after testing each control in the application interface. According to the prompt code corresponding to each control pre-embedded in the preprocessed source code file, the developer can perform a predetermined operation on the abnormal control in the application interface to trigger the display of prompt information related to the abnormal control on the interface. In this way, the developer can quickly and accurately locate the control object corresponding to the abnormal control in the preprocessed source code file according to the prompt information corresponding to the abnormal control, so as to facilitate troubleshooting of the abnormal control object, thereby helping to improve the debugging efficiency of the application control.

[0019] The above description is only an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, it can be implemented according to the content of the specification. And in order to make the above and other objects, features and advantages of the present invention more obvious and understandable, the following specifically illustrates the embodiments of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] To achieve the above and related purposes, certain illustrative aspects are described herein in connection with the following description and the accompanying drawings, which indicate various ways in which the principles disclosed herein can be practiced, and all aspects and their equivalent aspects are intended to fall within the scope of the claimed subject matter. The above and other objects, features, and advantages of the present disclosure will become more apparent from the following detailed description when read in conjunction with the accompanying drawings. Throughout the present disclosure, like reference numerals generally refer to like parts or elements.

[0021] Figure 1 FIG. shows a schematic block diagram of a computing device 100 according to an embodiment of the present invention;

[0022] Figure 2 FIG. shows a flowchart of a method 200 for debugging an application program control according to an embodiment of the present invention;

[0023] Figure 3 FIG. shows a flowchart of preprocessing a source code file according to an embodiment of the present invention; and

[0024] Figure 4 FIG. shows a schematic diagram of a debugging device 400 according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0025] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be fully conveyed to those skilled in the art.

[0026] Figure 1 is a schematic block diagram of an exemplary computing device 100.

[0027] As Figure 1 shown, in a basic configuration 102, the computing device 100 typically includes a system memory 106 and one or more processors 104. A memory bus 108 can be used for communication between the processor 104 and the system memory 106.

[0028] Depending on the desired configuration, processor 104 can be any type of processor, including but not limited to: a microprocessor (UP), a microcontroller (UC), a digital information processor (DSP), or any combination thereof. Processor 104 can include one or more levels of cache such as level one cache 110 and level two cache 112, a processor core 114, and registers 116. Exemplary processor core 114 can include an arithmetic logic unit (ALU), a floating point unit (FPU), a digital signal processing core (DSP core), or any combination thereof. Exemplary memory controller 118 can be used with processor 104, or in some implementations, memory controller 118 can be an internal part of processor 104.

[0029] Depending on the desired configuration, system memory 106 can be any type of memory, including but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. System memory 106 can include an operating system 120, one or more applications 122, and program data 124. In some embodiments, applications 122 can be arranged to execute instructions on the operating system by one or more processors 104 using program data 124.

[0030] Computing device 100 further includes storage device 132, which includes removable storage 136 and non-removable storage 138.

[0031] Computing device 100 can also include a storage interface bus 134. Storage interface bus 134 enables communication from storage device 132 (e.g., removable storage 136 and non-removable storage 138) via bus / interface controller 130 to basic configuration 102. At least a portion of operating system 120, applications 122, and data 124 can be stored on removable storage 136 and / or non-removable storage 138, and when computing device 100 is powered on or an application 122 is to be executed, it is loaded into system memory 106 via storage interface bus 134 and executed by one or more processors 104.

[0032] The computing device 100 may also include an interface bus 140 that facilitates communication from various interface devices (e.g., output device 142, peripheral interface 144, and communication device 146) to the basic configuration 102 via the bus / interface controller 130. Example output devices 142 include an image processing unit 148 and an audio processing unit 150. They may be configured to facilitate communication with various external devices such as a display or speakers via one or more A / V ports 152. Example peripheral interfaces 144 may include a serial interface controller 154 and a parallel interface controller 156, which may be configured to facilitate communication with external devices such as input devices (e.g., keyboard, mouse, pen, voice input device, touch input device) or other peripherals (e.g., printer, scanner, etc.) via one or more I / O ports 158. Example communication device 146 may include a network controller 160, which may be arranged to facilitate communication with one or more other computing devices 162 via one or more communication ports 164 over a network communication link.

[0033] The network communication link may be an example of a communication medium. A communication medium generally may embody computer readable instructions, data structures, program modules in a modulated data signal such as a carrier wave or other transport mechanism and may include any information delivery medium. A “modulated data signal” may be a signal that has one or more of its data set or its changes set in a manner that encodes information in the signal. By way of non-limiting example, the communication medium may include wired media such as a wired network or a dedicated line network, as well as various wireless media such as sound, radio frequency (RF), microwave, infrared (IR), or other wireless media. The term computer readable medium as used herein may include both storage media and communication media.

[0034] The computing device 100 may be implemented as a personal computer including desktop and laptop computer configurations. Of course, the computing device 100 may also be implemented as part of a small size portable (or mobile) electronic device, which may be such as a cellular phone, a digital camera, a personal digital assistant (PDA), a personal media player device, a wireless network browsing device, a personal head-mounted device, an application specific device, or a hybrid device that may include any of the above functions. It may even be implemented as a server such as a file server, a database server, an application server, and a WEB server, etc. Embodiments of the present invention are not limited thereto.

[0035] In an embodiment according to the present invention, the computing device 100 is configured to execute the debugging method 200 of the application program control according to the present invention. Among them, the application of the computing device 100 includes multiple program instructions for executing the debugging method 200 of the application program control according to the present invention, and these program instructions can be read and executed by the processor, so that the computing device 100 can quickly locate the control object corresponding to the abnormal control after determining the abnormal control by executing the debugging method 200 of the application program control according to the present invention.

[0036] According to an embodiment of the present invention, the application of the computing device 100 includes a debugging device 300, and the debugging device 300 includes multiple program instructions for executing the debugging method 200 of the application program control according to the present invention, so that the debugging method 200 of the application program control according to the present invention can be executed in the debugging device 300.

[0037] Figure 2 The flowchart of the debugging method 200 of the application program control according to an embodiment of the present invention is shown. The debugging method 200 of the application program control can be executed in the debugging device 300 of a computing device (such as the aforementioned computing device 100).

[0038] In an embodiment according to the present invention, the application program is a GUI application program with a graphical user interface, and the interface of the GUI application program includes one or more controls.

[0039] As Figure 2 shown, the method 200 includes steps S210 to S230.

[0040] In step S210, a preprocessed source code file is obtained, and a corresponding application program is built based on the preprocessed source code file. Here, the present invention builds an application program by compiling the preprocessed source code file, and the built application program is the application program to be debugged. Among them, the preprocessed source code file includes one or more control objects and the prompt code corresponding to each control object, and the interface of the application program includes the controls corresponding to each control object in the preprocessed source code file.

[0041] It should be noted that the application program to be debugged can correspond to one or more preprocessed source code files. In other words, the application program to be debugged can be built based on the corresponding one or more preprocessed source code files. Based on this, what can be obtained in step S210 can be one or more preprocessed source code files corresponding to the application program. Each preprocessed source code file is obtained by preprocessing the corresponding source code file.

[0042] Subsequently, in step S220, the built application program is run on the operating system of the computing device, and each control in the application program interface is tested to test the functions and performance of each control, so as to determine one or more abnormal controls with abnormalities in the application program interface.

[0043] In one embodiment, the controls tested in the application program interface include, for example, one or more of a text box, a list box, a checkbox, a search box, a command button, a radio button, a paging control, an upload control, and a scroll bar.

[0044] In one implementation, an automated testing tool based on GUI can be used to automatically run a test program to perform automated testing on each control in the application program interface by writing test scripts and inputting test data. For example, it can simulate the operations of the controls in the interface by the user (including simulating input operations, simulating click operations, simulating sliding operations, etc.) to complete the testing of the functionality and performance of each control.

[0045] In one implementation, the automated testing process of the control can include a recording and playback process. The recording process can use an automated testing tool to test the functions of the controls in the application program and record the operation process to generate a corresponding script. In the playback process, the errors and defects existing in the recording process can be viewed based on the script generated in the recording process to determine one or more abnormal controls existing in the application program interface.

[0046] It should be noted that the present invention does not limit the specific method for testing controls, and any testing method in the prior art that can implement automated testing of controls is within the protection scope of the present invention.

[0047] Next, for each abnormal control determined in the application program interface after testing, the developer performs a predetermined operation on the abnormal control to trigger the display of a prompt message corresponding to the abnormal control. Specifically, refer to the following step S230.

[0048] In step S230, in response to a predetermined operation on the abnormal control in the application program interface, the prompt code corresponding to the abnormal control (corresponding control object) is executed to display a corresponding prompt message within the predetermined range of the abnormal control. Here, the prompt message includes the relevant information of the abnormal control. The present invention displays the prompt message corresponding to the abnormal control in response to a predetermined operation on the abnormal control. In this way, the control object corresponding to the abnormal control can be quickly and accurately located in the preprocessed source code file based on the prompt message corresponding to the abnormal control. In this way, the positioning process of the abnormal control object is more time-saving, so as to facilitate the troubleshooting of the abnormal control object, thereby improving the overall efficiency of the application program controls.

[0049] It should be noted that the prompt code corresponding to each control object is pre-embedded in the preprocessed source code file corresponding to the application program. A predetermined operation on an abnormal control can trigger the execution of the prompt code corresponding to the abnormal control, and by executing the prompt code corresponding to the abnormal control, prompt information corresponding to the abnormal control can be displayed within a predetermined range around the abnormal control.

[0050] It should be pointed out that in the embodiments of the present invention, the preprocessed source code file obtained by preprocessing the source code file and pre-embedding the prompt code corresponding to each control in the source code file is used to construct the application program to be debugged. After testing each control in the application program interface, each abnormal control is determined. According to the prompt code corresponding to each control pre-embedded in the preprocessed source code file, developers can perform a predetermined operation on the abnormal control in the application program interface to trigger the display of prompt information related to the abnormal control on the interface, so that developers can quickly and accurately locate the control object corresponding to the abnormal control in the preprocessed source code file according to the prompt information corresponding to the abnormal control.

[0051] In one embodiment, after executing the prompt code corresponding to the abnormal control, the prompt information displayed within the predetermined range of the abnormal control specifically includes the object identifier name corresponding to the abnormal control. In this way, developers can quickly and accurately locate the control object corresponding to the abnormal control in the preprocessed source code file according to the object identifier corresponding to the abnormal control.

[0052] It should be pointed out that the present invention is not limited to the specific operation method of performing a predetermined operation on the abnormal control. In one implementation manner, the predetermined operation on the abnormal control can be, for example, an operation in which the mouse pointer hovers over the abnormal control for a predetermined time. In other words, in step S230, in response to the operation in which the mouse pointer hovers over the abnormal control for a predetermined time, the prompt code corresponding to the abnormal control can be executed to display corresponding prompt information within the predetermined range of the abnormal control.

[0053] According to an embodiment of the present invention, before executing step S210 to obtain the preprocessed source code file, one or more source code files corresponding to the application program are preprocessed in advance to obtain corresponding one or more preprocessed source code files.

[0054] Figure 3 FIG. shows a flowchart of preprocessing a source code file according to an embodiment of the present invention.

[0055] As Figure 3 shown, the method of preprocessing a source code file can be implemented as:

[0056] Obtain one or more source code files corresponding to the application. Specifically, by obtaining the paths of one or more source code files corresponding to the application, then sequentially extracting each source code file path, and obtaining the corresponding source code file based on each source code file path.

[0057] Next, determine all control objects in each source code file. In one implementation, by traversing each source code file, locate each control object (an object belonging to a control) in the source code file, and each control object can be marked. Here, control objects can include objects such as pointers and non-pointers.

[0058] Next, insert hint code corresponding to each control object into the source code file to obtain a preprocessed source code file. Specifically, sequentially extract each control object, obtain the code position where each control object first allocates memory, and based on the code position where each control object first allocates memory, insert hint code corresponding to each control object into the source code file, and a preprocessed source code file corresponding to the source code file can be obtained.

[0059] In one implementation, by sequentially extracting each marked control object from the source code file and obtaining the code position where each marked control object first allocates memory. Furthermore, hint code corresponding to the control object can be inserted below the code position where the control object first allocates memory in the source code file.

[0060] It should be noted that by executing the hint code corresponding to the control object, corresponding hint information can be generated, and the hint information includes the object identifier name of the control object.

[0061] It should also be pointed out that the steps of preprocessing the source code file in the present invention are all automatically executed in the debugging device. Among them, the operations of locating, marking each control object and inserting hint code in the source code file are all automatically executed, and developers do not need to search for control objects and manually modify the code. In this way, the efficiency of inserting hint code for control objects in the process of preprocessing the source code file is improved.

[0062] In one embodiment, the hint code can specifically be implemented as source code for performing a Tool Tip operation. That is, source code for performing a Tool Tip operation corresponding to the control object is inserted below the code position where the control object first allocates memory in the source code file. It should be noted that inserting source code for performing a Tool Tip operation in the source code file will not affect the running process of the application, and thus will not affect the testing of application program controls.

[0063] Such as Figure 3As shown, for each control object, after inserting the hint code corresponding to the control object (the source code for performing the Tool Tip operation) below the code position where the control object first applies for memory, it is determined whether the object is the last control object. If it is not the last control object, the next control object in the current source code file is extracted, the code position where the next control object first applies for memory is obtained, and the hint code corresponding to the control object is inserted below the code position where the next control object first applies for memory.

[0064] If it is the last control object, it is determined that the preprocessing of the source code file is completed, and the current modified source code file is saved to obtain the corresponding preprocessed source code file. Then, it is determined whether the source code file is the last source code file. If not, the path of the next source code file is extracted, the next source code file is obtained based on the path of the next source code file, and then the above steps for preprocessing the source code file are executed until the hint code corresponding to each control object is inserted below the code position where the control object first applies for memory in the next source code file.

[0065] If the source code file is the last source code file, the preprocessing process for all source code files ends, and at this time, the preprocessed source code files corresponding to each source code file are obtained.

[0066] In one embodiment, the source code file and the preprocessed source code file are both C++ source code files. Correspondingly, the control object is a C++ object.

[0067] In one implementation, after obtaining each source code file, an analysis session can be created based on the source code file, one or more control objects in the source code file can be determined through analysis, and each control object can be obtained. Subsequently, for each control object, the position where the control object first applies for memory is obtained. Then, hint code is inserted at the code position where the control object has first applied for memory inside the analysis session. Finally, the analysis session is restored to the source code file for saving to obtain the preprocessed source code file.

[0068] Figure 4 FIG. shows a schematic diagram of a debugging device 400 according to an embodiment of the present invention. The debugging device 400 is deployed in a computing device (such as the aforementioned computing device 100) and is adapted to execute the debugging method 200 of the application program control of the present invention.

[0069] As Figure 4 shown, the debugging device 400 includes a preprocessing module 405, a construction module 410, a testing module 420, and a hint module 430 that are sequentially coupled.

[0070] The preprocessing module 405 is used to execute the above-mentioned preprocessing process for the source code file (see Figure 3 ), by preprocessing one or more source code files corresponding to the application to obtain one or more corresponding preprocessed source code files.

[0071] The construction module 410 can obtain a preprocessed source code file obtained after the preprocessing module preprocesses the source code file, and construct an application based on the preprocessed source code file. The preprocessed source code file includes one or more control objects and a prompt code corresponding to each control object, and the interface of the application includes a control corresponding to each control object.

[0072] By running the application on the operating system, each control in the application interface is tested using the test module 420 to determine one or more abnormal controls in the application interface.

[0073] In response to a predetermined operation on the abnormal control, the prompt module 430 executes a prompt code corresponding to the abnormal control to display corresponding prompt information within a predetermined range of the abnormal control, so as to locate the control object corresponding to the abnormal control in the preprocessed source code file based on the prompt information.

[0074] It should be noted that the preprocessing module 405 is used to execute the aforementioned preprocessing process for the source code file, by preprocessing one or more source code files corresponding to the application to obtain the corresponding one or more preprocessed source code files. The construction module 410 is used to execute the aforementioned step S210, the test module 420 is used to execute the aforementioned step S220, and the prompt module 430 is used to execute the aforementioned step S230. Here, the specific execution logic of the preprocessing module 405, the construction module 410, the test module 420 and the prompt module 430 refers to the description of the preprocessing process before step S210 and steps S210 to S230 in the method 200 above, which will not be repeated here.

[0075] According to the debugging method 200 of the application control of the present invention, an application is constructed based on a preprocessed source code file obtained by pre-embedding the prompt code corresponding to each control in the source code file, and each abnormal control is determined after testing each control in the application interface. According to the prompt code corresponding to each control pre-embedded in the preprocessed source code file, the developer can perform predetermined operations on the abnormal control in the application interface to trigger the prompt information related to the abnormal control to be displayed on the interface. In this way, the developer can quickly and accurately locate the control object corresponding to the abnormal control in the preprocessed source code file according to the prompt information corresponding to the abnormal control, so as to facilitate the troubleshooting of the abnormal control object, thereby helping to improve the debugging efficiency of the application control.

[0076] The various techniques described herein can be implemented in combination with hardware or software, or a combination thereof. Thus, the methods and devices of the present invention, or certain aspects or portions of the methods and devices of the present invention, may take the form of program code (i.e., instructions) embedded in a tangible medium, such as a removable hard disk, USB flash drive, floppy disk, CD-ROM, or any other machine-readable storage medium, wherein when the program is loaded into a machine such as a computer and executed by the machine, the machine becomes a device for practicing the present invention.

[0077] In the case where the program code is executed on a programmable computer, the computing device generally includes a processor, a processor-readable storage medium (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device. Among them, the memory is configured to store the program code; the processor is configured to execute the debugging method of the application program control of the present invention according to the instructions in the program code stored in the memory.

[0078] By way of example and not limitation, the readable medium includes a readable storage medium and a communication medium. The readable storage medium stores information such as computer-readable instructions, data structures, program modules, or other data. The communication medium generally embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and includes any information delivery medium. A combination of any of the above is also included within the scope of the readable medium.

[0079] In the specification provided herein, the algorithms and displays are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the examples of the present invention. Based on the above description, the structure required to construct such a system is obvious. In addition, the present invention is not directed to any particular programming language. It should be understood that the content of the present invention described herein can be implemented using various programming languages, and the description of the specific language above is for disclosing the best mode of the present invention.

[0080] In the specification provided herein, a large number of specific details are set forth. However, it can be understood that the embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0081] Similarly, it should be understood that, in order to streamline the present disclosure and assist in understanding one or more of the various inventive aspects, in the foregoing description of the exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Thus, the claims following the detailed description are hereby expressly incorporated into the detailed description, with each claim standing on its own as a separate embodiment of the present invention.

[0082] Those skilled in the art should understand that the modules or units or components of the devices in the examples disclosed herein may be arranged in the devices as described in the embodiments, or alternatively may be located in one or more devices different from the devices in the examples. The modules in the foregoing examples may be combined into one module or further divided into multiple sub-modules.

[0083] Those skilled in the art can understand that the modules in the devices in the embodiments can be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and furthermore can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and / or processes or units are mutually exclusive, any combination can be adopted to combine all the features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all the processes or units of any method or device so disclosed. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) can be replaced by an alternative feature that provides the same, equivalent, or similar purpose.

[0084] In addition, those skilled in the art can understand that, although some of the embodiments described herein include certain features included in other embodiments rather than other features, the combination of the features of different embodiments means that it is within the scope of the present invention and forms different embodiments.

[0085] In addition, some of the embodiments are herein described as a combination of methods or method elements that can be implemented by a processor of a computer system or by other devices performing the functions. Thus, a processor having the necessary instructions for implementing the method or method elements forms a device for implementing the method or method elements. In addition, the elements described herein in the device embodiments are examples of the following devices: the devices for implementing the functions performed by the elements for the purpose of implementing the present invention.

[0086] As used herein, unless otherwise specified, use of the ordinal numbers “first,” “second,” “third,” and so forth to describe ordinary objects merely indicates different instances of like objects and is not intended to imply that the objects so described must be in a given sequence, whether temporally, spatially, in ranking, or in any other manner.

[0087] Although the invention has been described in terms of a limited number of embodiments, those skilled in the art, having the benefit of the foregoing description, will appreciate that other embodiments can be contemplated within the scope of the invention as thus described. Additionally, it should be noted that the language used in this specification has been principally selected for readability and instructional purposes and not to limit or define the subject matter of the invention. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The disclosure of the invention is illustrative, not restrictive, and the scope of the invention is defined by the appended claims.

Claims

1. A debugging method for application program controls, which is executed in a computing device and includes the steps of: Obtaining one or more source code files corresponding to the application program; Determining all control objects in each source code file; Inserting prompt codes corresponding to each control object into the source code file to obtain a preprocessed source code file; Obtaining the preprocessed source code file and building an application program based on the preprocessed source code file, wherein the interface of the application program includes controls corresponding to each control object; Testing each control in the interface of the application program to determine one or more abnormal controls in the interface of the application program, and the controls include one or more of a text box, a list box, a checkbox, a search box, a command button, a radio button, a paging control, an upload control, and a scroll bar; and In response to a predetermined operation on an abnormal control, executing the prompt code corresponding to the abnormal control to display corresponding prompt information within a predetermined range of the abnormal control, and the prompt information includes the object identifier name corresponding to the abnormal control, so as to locate the control object corresponding to the abnormal control in the preprocessed source code file based on the object identifier name corresponding to the abnormal control.

2. The method according to claim 1, wherein, The response to a predetermined operation on an abnormal control includes: Responding to an operation in which the mouse pointer hovers over the abnormal control for a predetermined time.

3. The method according to claim 2, wherein The step of inserting prompt codes corresponding to each control object into the source code file includes: Obtaining the code position where each control object first applies for memory; Based on the code position where each control object first applies for memory, inserting the prompt code corresponding to the control object into the source code file to obtain a preprocessed source code file.

4. The method according to claim 2 or 3, wherein, The step of obtaining one or more source code files corresponding to the application program includes: Obtaining one or more source code file paths corresponding to the application program; Obtaining the corresponding source code file based on each source code file path.

5. The method according to claim 2 or 3, wherein, The step of determining all control objects in each source code file includes: Traversing each source code file, locating each control object in the source code file, and marking each control object.

6. The method according to claim 2 or 3, wherein The prompt code is a code for performing a Tool Tip operation.

7. A debugging device, which resides in a computing device and includes: A building module, which is adapted to obtain one or more source code files corresponding to the application program, determine all control objects in each source code file, and insert prompt codes corresponding to each control object into the source code file to obtain a preprocessed source code file; And is adapted to obtain the preprocessed source code file and build an application program based on the preprocessed source code file, wherein the interface of the application program includes controls corresponding to each control object; A testing module, which is adapted to test each control in the interface of the application program to determine one or more abnormal controls in the interface of the application program, and the controls include one or more of a text box, a list box, a checkbox, a search box, a command button, a radio button, a paging control, an upload control, and a scroll bar; and A hint module, adapted to execute hint codes corresponding to the exception control in response to a predetermined operation on the exception control, so as to display corresponding hint information within a predetermined range of the exception control, where the hint information includes the object identifier name corresponding to the exception control, so as to locate the control object corresponding to the exception control in the preprocessed source code file based on the object identifier name corresponding to the exception control.

8. A computing device, comprising: At least one processor; And A memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, and the program instructions include instructions for executing the method according to any one of claims 1-6.

9. A readable storage medium storing program instructions, which when read and executed by a computing device, cause the computing device to execute the method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Method and system for automatic testing based on control

    CN104598380A

  • A debugging method, debugging device, and computing device for application controls.

    CN114328273B