CN114328273A - Debugging method and device for application program control and computing equipment - Google Patents

Debugging method and device for application program control and computing equipment Download PDF

Info

Publication number
CN114328273A
CN114328273A CN202210214277.9A CN202210214277A CN114328273A CN 114328273 A CN114328273 A CN 114328273A CN 202210214277 A CN202210214277 A CN 202210214277A CN 114328273 A CN114328273 A CN 114328273A
Authority
CN
China
Prior art keywords
control
source code
code file
application program
abnormal
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.)
Granted
Application number
CN202210214277.9A
Other languages
Chinese (zh)
Other versions
CN114328273B (en
Inventor
王正阳
刘明航
张勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Uniontech Software Technology Co Ltd
Original Assignee
Uniontech Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Uniontech Software Technology Co Ltd filed Critical Uniontech Software Technology Co Ltd
Priority to CN202210540606.9A priority Critical patent/CN114880231A/en
Priority to CN202210214277.9A priority patent/CN114328273B/en
Publication of CN114328273A publication Critical patent/CN114328273A/en
Application granted granted Critical
Publication of CN114328273B publication Critical patent/CN114328273B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

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)
  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a debugging method, a debugging device and computing equipment of an application program control, wherein the method is executed in the computing equipment and comprises the following steps: the method comprises the steps of obtaining a preprocessing source code file, and constructing an application program based on the preprocessing source code file, wherein the preprocessing source code file comprises one or more control objects and prompt codes corresponding to the control objects, and an interface of the application program comprises controls corresponding to the control objects; testing each control in the application program interface to determine one or more abnormal controls in the application program interface; and responding to the preset operation on the abnormal control, executing the prompt code corresponding to the abnormal control to display the corresponding prompt information in the preset range of the abnormal control, so as to locate the control object corresponding to the abnormal control in the preprocessing source code file based on the prompt information. According to the technical scheme of the invention, the control object corresponding to the abnormal control can be quickly positioned.

Description

Debugging method and device for application program control and computing equipment
Technical Field
The invention relates to the technical field of computer and software debugging, in particular to a debugging method, a debugging device and computing equipment for an application program control.
Background
In existing graphical operating systems, developers often need to integrate a large number of control elements in the software. However, when testing software, a developer can only submit a BUG to the developer according to the display condition of an interface, and when facing a large number of control unit objects in a code file, the developer or a subsequent maintainer often cannot quickly and accurately locate a control object of an abnormal control in the code file, which results in a large amount of time consumption in this link.
In the prior art, there is a software debugging Tool, which captures debugging information pre-embedded in a compiler during a compiling stage, automatically modifies a machine code of an executable file to generate a Tool Tip execution code of a control object, and further displays marked content in a subsequent debugging process. However, with this technical solution, the generation of the machine code and the debugging information depends on the current compiler version and system environment, and after the compiler is upgraded or the system environment is replaced, the corresponding software debugging tool also needs to be upgraded and adapted, so that the software debugging tool written each time has certain limitations.
Therefore, a debugging method for an application control is needed to solve the problems in the above technical solutions.
Disclosure of Invention
Therefore, the present invention provides a debugging method and a debugging apparatus for an application control, in an attempt to solve or at least alleviate the above problems.
According to one aspect of the invention, a debugging method of an application control is provided, which is executed in a computing device and comprises the following steps: the method comprises the steps of obtaining a preprocessing source code file, and constructing an application program based on the preprocessing source code file, wherein the preprocessing source code file comprises one or more control objects and prompt codes corresponding to the control objects, and an interface of the application program comprises controls corresponding to the control objects; testing each control in an application program interface to determine one or more abnormal controls in the application program interface; and responding to a preset operation on an abnormal control, executing prompt codes corresponding to the abnormal control to display corresponding prompt information in a preset range of the abnormal control, so that a control object corresponding to the abnormal control is positioned in the preprocessing source code file based on the prompt information.
Optionally, in the method for debugging an application control according to the present invention, responding to a predetermined operation on an exception control includes: and responding to the operation that the mouse pointer hovers over the abnormal control for the preset time.
Optionally, in the method for debugging an application control according to the present invention, the prompt information includes an object identifier name corresponding to the abnormal control.
Optionally, in the method for debugging an application control according to the present invention, before acquiring the preprocessed source code file, the method includes the steps of: acquiring one or more source code files corresponding to the application program; determining all control objects in each source code file; and inserting a prompt code corresponding to each control object in the source code file to obtain a preprocessed source code file.
Optionally, in the method for debugging an application control according to the present invention, the step of inserting a hint code corresponding to each control object in the source code file includes: acquiring a code position of a first memory application of each control object; and inserting a prompt code corresponding to each control object into the source code file based on the code position of the memory which is applied for the first time by each control object to obtain a preprocessed source code file.
Optionally, in the method for debugging an application control according to the present invention, the step of obtaining one or more source code files corresponding to an application includes: acquiring one or more source code file paths corresponding to an application program; and acquiring a corresponding source code file based on each source code file path.
Optionally, in the method for debugging an application control according to the present invention, the step of determining all control objects in each source code file includes: and traversing each source code file, positioning each control object in the source code file, and marking each control object.
Optionally, in the method for debugging an application control according to the present invention, the prompt code is a code for executing a Tool Tip operation.
According to an aspect of the present invention, there is provided a debugging apparatus, residing in a computing device, comprising: the building module is suitable for acquiring a preprocessing source code file and building an application program based on the preprocessing source code file, wherein the preprocessing source code file comprises one or more control objects and prompt codes corresponding to the control objects, and an interface of the application program comprises a control corresponding to each control object; the testing module is suitable for testing each control in the application program interface so as to determine one or more abnormal controls in the application program interface; and the prompt module is suitable for responding to a preset operation on an abnormal control, executing prompt codes corresponding to the abnormal control to display corresponding prompt information in a preset range of the abnormal control, so that a control object corresponding to the abnormal control is positioned in the preprocessing source code file based on the prompt information.
According to an 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 executed by the at least one processor, the program instructions comprising instructions for performing the method of debugging an application control as described above.
According to an aspect of the present invention, there is provided a readable storage medium storing program instructions which, when read and executed by a computing device, cause the computing device to perform the method as described above.
According to the technical scheme of the invention, the debugging method of the application program control is provided, the application program is constructed based on the preprocessed source code file obtained after the prompt code corresponding to each control is pre-embedded in the source code file, and each abnormal control is determined by testing each control in the application program interface, according to the prompt codes corresponding to the controls pre-embedded in the preprocessing source code file, developers can perform preset operation on the abnormal controls on an application program interface to trigger the display of prompt information related to the abnormal controls on the interface, therefore, the developer can quickly and accurately position the control object corresponding to the abnormal control in the preprocessing source code file according to the prompt information corresponding to the abnormal control, therefore, the debugging processing of the abnormal control object is facilitated, and the debugging efficiency of the application program control is improved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which are indicative of various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to be 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 read in conjunction with the accompanying drawings. Throughout this disclosure, like reference numerals generally refer to like parts or elements.
FIG. 1 shows a schematic block diagram of a computing device 100, according to one embodiment of the invention;
FIG. 2 illustrates a flow diagram of a method 200 for debugging an application control in accordance with one embodiment of the present invention;
FIG. 3 illustrates a flow diagram for pre-processing a source code file according to one embodiment of the invention; and
fig. 4 shows a schematic diagram of a debugging apparatus 400 according to an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Fig. 1 is a schematic block diagram of an example computing device 100.
As shown in FIG. 1, in a basic configuration 102, a computing device 100 typically includes a system memory 106 and one or more processors 104. A memory bus 108 may be used for communication between the processor 104 and the system memory 106.
Depending on the desired configuration, the processor 104 may be any type of processing, including but not limited to: a microprocessor (UP), a microcontroller (UC), a digital information processor (DSP), or any combination thereof. The processor 104 may include one or more levels of cache, such as a level one cache 110 and a level two cache 112, a processor core 114, and registers 116. The example processor core 114 may include an Arithmetic Logic Unit (ALU), a Floating Point Unit (FPU), a digital signal processing core (DSP core), or any combination thereof. The example memory controller 118 may be used with the processor 104, or in some implementations the memory controller 118 may be an internal part of the processor 104.
Depending on the desired configuration, system memory 106 may 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 may include an operating system 120, one or more applications 122, and program data 124. In some implementations, the application 122 can be arranged to execute instructions on an operating system with program data 124 by one or more processors 104.
Computing device 100 also includes a storage device 132, storage device 132 including removable storage 136 and non-removable storage 138.
Computing device 100 may also include a storage interface bus 134. The storage interface bus 134 enables communication from the storage devices 132 (e.g., removable storage 136 and non-removable storage 138) to the basic configuration 102 via the bus/interface controller 130. At least a portion of the operating system 120, applications 122, and data 124 may be stored on removable storage 136 and/or non-removable storage 138, and loaded into system memory 106 via storage interface bus 134 and executed by the one or more processors 104 when the computing device 100 is powered on or the applications 122 are to be executed.
Computing device 100 may also include an interface bus 140 that facilitates communication from various interface devices (e.g., output devices 142, peripheral interfaces 144, and communication devices 146) to the basic configuration 102 via the bus/interface controller 130. The example output device 142 includes 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. An example communication device 146 may include a network controller 160, which may be arranged to facilitate communications with one or more other computing devices 162 over a network communication link via one or more communication ports 164.
A network communication link may be one example of a communication medium. Communication media may typically be embodied by computer readable instructions, data structures, program modules, and may include any information delivery media, such as carrier waves or other transport mechanisms, in a modulated data signal. A "modulated data signal" may be a signal that has one or more of its data set or its changes made in a manner that encodes information in the signal. By way of non-limiting example, communication media may include wired media such as a wired network or private-wired network, and various wireless media such as acoustic, Radio Frequency (RF), microwave, Infrared (IR), or other wireless media. The term computer readable media as used herein may include both storage media and communication media.
Computing device 100 may be implemented as a personal computer including both desktop and notebook computer configurations. Of course, computing device 100 may also be implemented as part of a small-form factor portable (or mobile) electronic device such as a cellular telephone, a digital camera, a Personal Digital Assistant (PDA), a personal media player device, a wireless web-watch device, a personal headset, an application specific device, or a hybrid device that include any of the above functions. And may even be implemented as a server, such as a file server, a database server, an application server, a WEB server, and so forth. The embodiments of the present invention are not limited thereto.
In an embodiment in accordance with the invention, computing device 100 is configured to perform a debugging method 200 of an application control in accordance with the invention. The application of the computing device 100 includes a plurality of program instructions for executing the debugging method 200 of the application control of the present invention, and these program instructions can be read and executed by a processor, so that the computing device 100 can quickly locate a control object corresponding to an abnormal control after determining the abnormal control by executing the debugging method 200 of the application control of the present invention.
According to an embodiment of the present invention, the application of the computing device 100 includes a debugging apparatus 300, and the debugging apparatus 300 includes a plurality of program instructions for executing the debugging method 200 of the application control of the present invention, so that the debugging method 200 of the application control of the present invention can be executed in the debugging apparatus 300.
FIG. 2 illustrates a flow diagram of a method 200 for debugging an application control in accordance with one embodiment of the present invention. The debugging method 200 of the application control can be executed in the debugging apparatus 300 of a computing device (such as the aforementioned computing device 100).
In an embodiment in accordance with the invention, the application is a GUI application having a graphical user interface including one or more controls in the interface of the GUI application.
As shown in FIG. 2, the method 200 includes steps S210-S230.
In step S210, a preprocessing source code file is obtained, and a corresponding application program is constructed based on the preprocessing source code file. The invention builds the application program by compiling the preprocessed source code file, and the built application program is the application program to be debugged. The preprocessing source code file comprises one or more control objects and prompt codes corresponding to the control objects, and an interface of the application program comprises controls corresponding to the control objects in the preprocessing source code file.
It should be noted that the application to be debugged may correspond to one or more preprocessed source code files. In other words, the application to be debugged may be built based on the corresponding one or more preprocessed source code files. Based on this, the one or more preprocessed source code files corresponding to the application program may be acquired in step S210. Each preprocessed source code file is obtained by preprocessing the corresponding source code file.
Subsequently, in step S220, the built application program is run on the operating system of the computing device, and the function and performance of each control is tested by testing each control in the application program interface, so as to determine one or more abnormal controls in the application program interface, where an abnormality exists.
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 check box, a search box, a command button, a radio button, a page-turning control, an upload control, a scroll bar.
In one implementation, a GUI-based automated testing tool may be used to automatically run a test program to perform an automated test on each control in an application program interface by writing a test script and inputting test data, for example, the user operation (including an input operation simulation, a click operation simulation, a slide operation simulation, and the like) on the control in the interface may be simulated to complete the test on the functionality and performance of each control.
In an implementation manner, the automatic testing process for the control may include a recording and playback process, and the recording process may utilize an automatic testing tool to test the function of the control in the application program and record an operation process, so as to generate a corresponding script. During the playback process, errors and defects existing in the recording process can be checked based on the script generated by the recording process so as to determine one or more abnormal controls existing in the application program interface.
It should be noted that the present invention is not limited to the specific method for testing the control, and any testing method capable of automatically testing the control in the prior art is within the scope of the present invention.
Next, for each abnormal control determined in the application program interface after the test, the developer performs a predetermined operation on the abnormal control to trigger to display the prompt information corresponding to the abnormal control, specifically refer to step S230 below.
In step S230, in response to a predetermined operation on the abnormal control in the application program interface, a prompt code corresponding to the abnormal control (corresponding control object) is executed to display corresponding prompt information within a predetermined range of the abnormal control. Here, the prompt information includes information related to the exception control. The method and the device for displaying the abnormal control prompt information respond to the preset operation on the abnormal control and display the prompt information corresponding to the abnormal control, so that the control object corresponding to the abnormal control can be quickly and accurately positioned in the preprocessed source code file based on the prompt information corresponding to the abnormal control. Therefore, the positioning process of the abnormal control object is more time-saving, so that the abnormal control object is conveniently debugged, and the overall efficiency of the application program control is improved.
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 the abnormal control may trigger execution of the prompt code corresponding to the abnormal control, and prompt information corresponding to the abnormal control may be displayed in a predetermined range around the abnormal control by executing the prompt code corresponding to the abnormal control.
It should be noted that, in the embodiment of the present invention, an application program to be debugged is constructed based on a preprocessed source code file obtained by preprocessing a source code file and pre-embedding a prompt code corresponding to each control in the source code file, each abnormal control is determined by testing each control in an application program interface, and according to the prompt code corresponding to each control pre-embedded in the preprocessed source code file, a developer may perform a predetermined operation on the abnormal control at the application program interface to trigger to display prompt information related to the abnormal control on the interface, so that the developer can quickly and accurately position a control object corresponding to the abnormal control in the preprocessed source code file according to the prompt information corresponding to the abnormal control.
In one embodiment, after the prompt code corresponding to the abnormal control is executed, the prompt information displayed in the predetermined range of the abnormal control specifically includes the object identifier name corresponding to the abnormal control. Therefore, a developer can quickly and accurately position the control object corresponding to the abnormal control in the preprocessing source code file according to the object identifier corresponding to the abnormal control.
It should be noted that the present invention is not limited to a particular manner of operation for performing a predetermined operation on an exception control. In one implementation, the predetermined operation on the exception control may be, for example, an operation in which a mouse pointer hovers over the exception control for a predetermined time. In other words, in step S230, in response to the operation of hovering the mouse pointer over the abnormal control for the predetermined time, the prompt code corresponding to the abnormal control may be executed to display the corresponding prompt information within the predetermined range of the abnormal control.
According to an embodiment of the present invention, before the preprocessing source code file is obtained in step S210, one or more source code files corresponding to the application program are preprocessed in advance to obtain one or more corresponding preprocessed source code files.
FIG. 3 illustrates a flow diagram for preprocessing a source code file according to one embodiment of the invention.
As shown in fig. 3, the method for preprocessing the source code file may be implemented as:
one or more source code files corresponding to the application program are obtained. Specifically, one or more source code file paths corresponding to the application program are obtained, then each source code file path is extracted in sequence, and the corresponding source code file is obtained based on each source code file path.
Next, all control objects in each source code file are determined. In one implementation, each control object (object belonging to the control) is located in the source code file by traversing each source code file, and each control object may be marked. Here, the control object may include a pointer, a non-pointer, or the like object.
And next, inserting prompt codes corresponding to each control object into the source code file to obtain a preprocessed source code file. Specifically, each control object is sequentially extracted, a code position of a memory for which each control object applies for the first time is obtained, and a prompt code corresponding to each control object is inserted into a source code file based on the code position of the memory for which each control object applies for the first time, so that a preprocessed source code file corresponding to the source code file can be obtained.
In one implementation mode, each marked control object is extracted from a source code file successively, and a code position of a memory is applied for the first time by each marked control object is obtained. Furthermore, a prompt code corresponding to the control object can be inserted into the source code file below the code position of the memory where the control object is applied for the first time.
It should be noted that, by executing the prompt code corresponding to the control object, corresponding prompt information may be generated, where the prompt information includes the object identifier name of the control object.
It should also be noted that the steps of preprocessing the source code file in the present invention are all automatically performed in the debugging apparatus, wherein the operations of positioning and marking each control object and inserting the prompt code in the source code file are all automatically performed without the need for a developer to search the control object and manually modify the code. Therefore, the efficiency of inserting the prompt code into the control object in the preprocessing process of the source code file is improved.
In one embodiment, the hint code may specifically be implemented as source code that performs Tool Tip (tooltip) operations. Namely, inserting the source code which executes the Tool Tip operation and corresponds to the control object below the code position of the first application memory of the control object in the source code file. It should be noted that, inserting the source code for executing the Tool Tip operation into the source code file does not affect the running flow of the application program, and thus does not affect the test of the application program control.
As shown in fig. 3, for each control object, after a prompt code (a source code for executing a Tool Tip operation) corresponding to the control object is inserted below a code position where the control object applies for the memory for the first time, it is determined whether the object is a last control object, if the object is not the last control object, a next control object in a current source code file is extracted, a code position where the next control object applies for the memory for the first time is obtained, and a prompt code corresponding to the control object is inserted below a code position where the next control object applies for the memory for the first time.
And if the control object is the last control object, determining that the source code file is preprocessed completely, and storing the currently modified source code file to obtain a corresponding preprocessed source code file. And then, judging whether the source code file is the last source code file or not, if not, extracting a next source code file path, acquiring a next source code file based on the next source code file path, and then executing the step of preprocessing the source code file until a prompt code corresponding to the control object is inserted below the code position where each control object of the next source code file applies for the memory for the first time.
If the source code file is the last source code file, the preprocessing process for all the source code files is finished, and at this time, the preprocessed source code files corresponding to each source code file are obtained.
In one embodiment, the source code file and the preprocessing source code file are both C + + source code files, and accordingly, the control object is a C + + object.
In an implementation manner, after each source code file is obtained, an analysis session may be created based on the source code file, one or more control objects in the source code file are determined through analysis, each control object is obtained, and then, a location where the control object applies for the memory for the first time is obtained for each control object. And then, inserting prompt codes into the code positions of the control objects which have applied for the memory for the first time in the analysis session. And finally, restoring the analysis session into a source code file for storage to obtain a preprocessed source code file.
Fig. 4 shows a schematic diagram of a debugging apparatus 400 according to an embodiment of the invention. The debugging apparatus 400 is deployed in a computing device (such as the aforementioned computing device 100) and is adapted to execute the application control debugging method 200 of the present invention.
As shown in fig. 4, the debugging apparatus 400 includes a preprocessing module 405, a building module 410, a testing module 420, and a prompting module 430, which are coupled in sequence.
The preprocessing module 405 is configured to execute the aforementioned preprocessing flow (see fig. 3) on the source code file, and preprocess one or more source code files corresponding to the application program to obtain one or more corresponding preprocessed source code files.
The building module 410 may obtain a preprocessed source code file obtained by preprocessing the source code file by the preprocessing module, and build the application based on the preprocessed source code file. The preprocessing source code file comprises one or more control objects and prompt codes corresponding to the control objects, and an interface of the application program comprises controls corresponding to the control objects.
By running an application on the operating system, each control in the application interface is tested with the testing module 420 to determine one or more anomalous controls in the application interface.
The hint module 430, in response to a predetermined operation on the exception control, executes hint code corresponding to the exception control to display corresponding hint information within a predetermined range of the exception control to locate a control object corresponding to the exception control in the pre-processed source code file based on the hint information.
It should be noted that the preprocessing module 405 is configured to execute the aforementioned preprocessing procedure on the source code file, and preprocess one or more source code files corresponding to the application program to obtain corresponding one or more preprocessed source code files. The building module 410 is configured to perform the step S210, the testing module 420 is configured to perform the step S220, and the prompting module 430 is configured to perform the step S230. Here, for the specific execution logic of the preprocessing module 405, the constructing module 410, the testing module 420 and the prompting module 430, reference is made to the preprocessing flow before step S210 and the descriptions of steps S210 to S230 in the method 200, and details are not described here again.
The debugging method 200 of the application program control according to the present invention is to construct an application program based on a preprocessed source code file obtained by pre-embedding a hint code corresponding to each control in a source code file, and each abnormal control is determined by testing each control in the application program interface, according to the prompt codes corresponding to the controls pre-embedded in the preprocessing source code file, developers can perform preset operation on the abnormal controls on an application program interface to trigger the display of prompt information related to the abnormal controls on the interface, therefore, the developer can quickly and accurately position the control object corresponding to the abnormal control in the preprocessing source code file according to the prompt information corresponding to the abnormal control, therefore, the debugging processing of the abnormal control object is facilitated, and the debugging efficiency of the application program control is improved.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as removable hard drives, U.S. disks, floppy disks, CD-ROMs, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the computing device will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to execute the debugging method of the application control of the present invention according to the instructions in the program code stored in the memory.
By way of example, and not limitation, readable media may comprise readable storage media and communication media. Readable storage media store information such as computer readable instructions, data structures, program modules or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of readable media.
In the description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with examples of this invention. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in a device as described in this embodiment or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into multiple sub-modules.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments.
Furthermore, some of the described embodiments are described herein as a method or combination of method elements that can be performed by a processor of a computer system or by other means of performing the described functions. A processor having the necessary instructions for carrying out the method or method elements thus forms a means for carrying out the method or method elements. Further, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is used to implement the functions performed by the elements for the purpose of carrying out the invention.
As used herein, unless otherwise specified the use of the ordinal adjectives "first", "second", "third", etc., to describe a common object, merely indicate that different instances of like objects are being referred to, and are not intended to imply that the objects so described must be in a given sequence, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this description, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. 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 present invention has been disclosed in an illustrative rather than a restrictive sense, and the scope of the present invention is defined by the appended claims.

Claims (11)

1. A debugging method of an application control is executed in a computing device and comprises the following steps:
the method comprises the steps of obtaining a preprocessing source code file, and constructing an application program based on the preprocessing source code file, wherein the preprocessing source code file comprises one or more control objects and prompt codes corresponding to the control objects, and an interface of the application program comprises controls corresponding to the control objects;
testing each control in an application program interface to determine one or more abnormal controls in the application program interface; and
and responding to a preset operation on an abnormal control, executing prompt codes corresponding to the abnormal control to display corresponding prompt information in a preset range of the abnormal control, so as to locate a control object corresponding to the abnormal control in the preprocessing source code file based on the prompt information.
2. The method of claim 1, wherein responding to a predetermined operation on an exception control comprises:
and responding to the operation that the mouse pointer hovers over the abnormal control for the preset time.
3. The method of claim 1, wherein the hints information comprises an object identifier name corresponding to the exception control.
4. A method according to any one of claims 1-3, wherein before obtaining the preprocessed source code file, comprising the steps of:
acquiring one or more source code files corresponding to the application program;
determining all control objects in each source code file;
and inserting a prompt code corresponding to each control object in the source code file to obtain a preprocessed source code file.
5. The method of claim 4, wherein inserting hinting code corresponding to each control object in the source code file comprises:
acquiring a code position of a first memory application of each control object;
and inserting a prompt code corresponding to each control object into the source code file based on the code position of the memory which is applied for the first time by each control object to obtain a preprocessed source code file.
6. The method of claim 4, wherein the step of obtaining one or more source code files corresponding to the application comprises:
acquiring one or more source code file paths corresponding to an application program;
and acquiring a corresponding source code file based on each source code file path.
7. The method of claim 4, wherein determining all control objects in each source code file comprises:
and traversing each source code file, positioning each control object in the source code file, and marking each control object.
8. The method of claim 4, wherein,
the prompt code is code for executing a Tool Tip operation.
9. A debugging apparatus, resident in a computing device, comprising:
the building module is suitable for acquiring a preprocessing source code file and building an application program based on the preprocessing source code file, wherein the preprocessing source code file comprises one or more control objects and prompt codes corresponding to the control objects, and an interface of the application program comprises a control corresponding to each control object;
the testing module is suitable for testing each control in the application program interface so as to determine one or more abnormal controls in the application program interface; and
and the prompt module is suitable for responding to a preset operation on an abnormal control, executing prompt codes corresponding to the abnormal control to display corresponding prompt information in a preset range of the abnormal control, so that a control object corresponding to the abnormal control is positioned in the preprocessing source code file based on the prompt information.
10. A computing device, comprising:
at least one processor; and
a memory storing program instructions, wherein the program instructions are configured to be adapted to be executed by the at least one processor, the program instructions comprising instructions for performing the method of any of claims 1-8.
11. A readable storage medium storing program instructions that, when read and executed by a computing device, cause the computing device to perform the method of any of claims 1-8.
CN202210214277.9A 2022-03-07 2022-03-07 Debugging method and device for application program control and computing equipment Active CN114328273B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210540606.9A CN114880231A (en) 2022-03-07 2022-03-07 Debugging method and device for application program control and computing equipment
CN202210214277.9A CN114328273B (en) 2022-03-07 2022-03-07 Debugging method and device for application program control and computing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210214277.9A CN114328273B (en) 2022-03-07 2022-03-07 Debugging method and device for application program control and computing equipment

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202210540606.9A Division CN114880231A (en) 2022-03-07 2022-03-07 Debugging method and device for application program control and computing equipment

Publications (2)

Publication Number Publication Date
CN114328273A true CN114328273A (en) 2022-04-12
CN114328273B CN114328273B (en) 2022-07-12

Family

ID=81030556

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202210540606.9A Pending CN114880231A (en) 2022-03-07 2022-03-07 Debugging method and device for application program control and computing equipment
CN202210214277.9A Active CN114328273B (en) 2022-03-07 2022-03-07 Debugging method and device for application program control and computing equipment

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202210540606.9A Pending CN114880231A (en) 2022-03-07 2022-03-07 Debugging method and device for application program control and computing equipment

Country Status (1)

Country Link
CN (2) CN114880231A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8296445B1 (en) * 2007-11-12 2012-10-23 Google Inc. Software testing harness
CN107463492A (en) * 2017-06-29 2017-12-12 北京五八信息技术有限公司 Application failure localization method and device
US20180039559A1 (en) * 2015-07-28 2018-02-08 TestPlant Europe Limited Method and apparatus for creating reference images for an automated test of software with a graphical user interface
CN108415820A (en) * 2017-02-09 2018-08-17 腾讯科技(深圳)有限公司 The test method and device of application installation package
CN109800161A (en) * 2018-12-28 2019-05-24 网宿科技股份有限公司 A kind of components testing method of user interface, electronic equipment and can storage medium
US10719427B1 (en) * 2017-05-04 2020-07-21 Amazon Technologies, Inc. Contributed test management in deployment pipelines
CN111679976A (en) * 2020-05-28 2020-09-18 泰康保险集团股份有限公司 Method and device for searching page object
CN113867847A (en) * 2021-11-30 2021-12-31 统信软件技术有限公司 Abnormal plug-in processing method and device and computing equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8296445B1 (en) * 2007-11-12 2012-10-23 Google Inc. Software testing harness
US20180039559A1 (en) * 2015-07-28 2018-02-08 TestPlant Europe Limited Method and apparatus for creating reference images for an automated test of software with a graphical user interface
CN108415820A (en) * 2017-02-09 2018-08-17 腾讯科技(深圳)有限公司 The test method and device of application installation package
US10719427B1 (en) * 2017-05-04 2020-07-21 Amazon Technologies, Inc. Contributed test management in deployment pipelines
CN107463492A (en) * 2017-06-29 2017-12-12 北京五八信息技术有限公司 Application failure localization method and device
CN109800161A (en) * 2018-12-28 2019-05-24 网宿科技股份有限公司 A kind of components testing method of user interface, electronic equipment and can storage medium
CN111679976A (en) * 2020-05-28 2020-09-18 泰康保险集团股份有限公司 Method and device for searching page object
CN113867847A (en) * 2021-11-30 2021-12-31 统信软件技术有限公司 Abnormal plug-in processing method and device and computing equipment

Also Published As

Publication number Publication date
CN114328273B (en) 2022-07-12
CN114880231A (en) 2022-08-09

Similar Documents

Publication Publication Date Title
US20160357519A1 (en) Natural Language Engine for Coding and Debugging
CN108459964B (en) Test case selection method, device, equipment and computer readable storage medium
CN111831564A (en) Regression testing method and device and computing equipment
US10049031B2 (en) Correlation of violating change sets in regression testing of computer software
CN105335282A (en) Method and system for cross-platform test of applications
CN114691240A (en) Drive hardware configuration information loading method, device and system and computing equipment
CN112445708A (en) Pressure testing method and device and computing equipment
JP2018532169A (en) Method and apparatus for generating, collecting, storing, and loading debug information about failed test scripts
CN116245074A (en) Chip verification method, device and storage medium
JP7409197B2 (en) Elaboration of repair patterns for static analysis violations in software programs
US8589734B2 (en) Verifying correctness of processor transactions
CN113609028A (en) Page testing method, computing device and readable storage medium
CN114328273B (en) Debugging method and device for application program control and computing equipment
US8739091B1 (en) Techniques for segmenting of hardware trace and verification of individual trace segments
CN114721922B (en) Performance evaluation method of server cluster, computing equipment and storage medium
CN111488275A (en) UI automation test method and device, storage medium and electronic equipment
CN112860267B (en) Kernel cutting method and computing device
CN115576711A (en) Method and system for simulating returned data and computing equipment
CN114546850A (en) Automatic testing method, system and device for embedded point and storage medium
CN113821438A (en) Application response performance test method and system and computing equipment
CN112765021A (en) Debugging and checking method, device, equipment and storage medium of boot program
CN113094052A (en) Application construction method and device, computer equipment and storage medium
CN112463624B (en) CPU verification platform based on Systemverilog
CN111506299B (en) Front-end data verification method and device and computer equipment
CN116501378B (en) Implementation method and device for reverse engineering reduction source code and electronic equipment

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
GR01 Patent grant
GR01 Patent grant