The present application generally relates to computer systems, programming and error identification, and more particularly to filtered presentation of structured data at debug time.
The amount of data accessible to an application program at any given execution instant is often very large, so that application developers are presented at debug time with large amounts of data, much of which may be irrelevant to the task at hand. This makes it difficult to focus on the salient aspects of the program's execution and its data state. Moreover, many common data structures contain vast amounts of bookkeeping data that may not be of interest. As a result, gaining a coherent picture of a data structure's contents at debug time can present a tedious task.
A method and system for filtered presentation of structured data at debug time are provided. The method, in one aspect, may include enabling, using a processor, specifying of one or more filters for presentation during a debug procedure. The method may also include applying the one or more filters to data structures of a program execution environment. The method may further include presenting one or more data values of the data structures meeting one or more criteria specified in the one or more filters.
A system for filtered presentation of structured data at debug time, in one aspect, may include a user interface module operable to enable a user to specify one or more filters for presentation during debug procedure. A debug module may be operable to apply the one or more filters to data structures of a program execution environment and identify data values of the data structures meeting one or more criteria specified in the one or more filters.
A computer readable storage medium storing a program of instructions executable by a machine to perform one or more methods described herein also may be provided.
Further features as well as the structure and operation of various embodiments are described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers indicate identical or functionally similar elements.
The present disclosure discloses a means, for instance, a method and/or system for the programmer to control at debug time the amount of data presented by the debugger for any given type of structured data.
In one aspect of the present disclosure, a set of filters are provided. The filters may be global, i.e. applicable to multiple programs that, e.g., share a common set of data types. Alternatively, the filters may be associated with a particular application being debugged. The debugger herein refers to an application, a module or a tool or the like that can be used for identifying errors in a program. The debugger may be a part of a programming environment, for instance, an integrated programming environment tool. The filters of the present disclosure may augment existing debuggers, and may be used as follows:
In one aspect, there may be at most one filter for each data type in the application being debugged. This type filter identifies the set of fields to be displayed by the debugger whenever a value of that data type is to be displayed.
In the case that no predicate is present in a given field filter, the corresponding field is always displayed whenever an instance of the given type of data is displayed. Conversely, any field for which there is no field filter in a given type filter would not be displayed by the debugger.
If, on the other hand, a given field specification contains a predicate, if that predicate evaluates to true, the field would be displayed. This means that at different points in a program's execution, a given instance of a given data type may be displayed with a different subset of its fields being visible.
In one aspect, a predicate expression may only reference data accessible from an object instance of the type associated with the filter. Specifically, though, predicate expressions may reference other fields in the given data type. For example, as shown in
While the above example illustrated the filter specification as specifying those fields which are to be displayed, filter specifications can also be used in a converse manner. That is, the filter mechanism of the present disclosure may be implemented so that those fields specified in the type field are not displayed, instead of being displayed.
A user interface module 202 presents to the user an interface, for instance, a display screen form for allowing the user to enter the desired filters, i.e., the types of data structure by unique identification and the fields of that data structure the user desires to see during the debug procedure or process, and any conditions under which the user desires to see the values for those fields. The input form may have enterable input fields, a list of menu items to select from or others. Other input mechanisms other than a display form may be utilized, for example, voice activated input and/or others. As explained above, the conditions may be specified by a predicate specification in the filter. During debug time, a debug module 206 applies the filters specified by the user to the data structure and data values of the program being debugged 208. At the predetermined or specified points of execution in the program, the data structure, data field values, and those data field values in which a condition was specified and those that satisfy the condition are presented to the user, for example, via the user interface module 202. The debugger module 206 and the user interface module 202 may be implemented as part of an integrated software development environment, which for example, enable users to program, execute, test and debug programs.
It should be understood that while
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or computer program product. Accordingly, aspects of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, micro-code, etc.) or an embodiment combining software and hardware aspects that may all generally be referred to herein as a “circuit,” “module” or “system.” Furthermore, aspects of the present invention may take the form of a computer program product embodied in one or more computer readable medium(s) having computer readable program code embodied thereon.
Any combination of one or more computer readable medium(s) may be utilized. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the “C” programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider).
Aspects of the present invention are described below with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer readable medium that can direct a computer, other programmable data processing apparatus, or other devices to function in a particular manner, such that the instructions stored in the computer readable medium produce an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Referring now to
The computer program product may comprise all the respective features enabling the implementation of the methodology described herein, and which—when loaded in a computer system—is able to carry out the methods. Computer program, software program, program, or software, in the present context means any expression, in any language, code or notation, of a set of instructions intended to cause a system having an information processing capability to perform a particular function either directly or after either or both of the following; (a) conversion to another language, code or notation; and/or (b) reproduction in a different material form.
The computer processing system that carries out the system and method of the present disclosure may also include a display device such as a monitor or display screen 4 for presenting output displays and providing a display through which the user may input data and interact with the processing system, for instance, in cooperation with input devices such as the keyboard 6 and mouse device 8 or pointing device. The computer processing system may be also connected or coupled to one or more peripheral devices such as the printer 10, scanner (not shown), speaker, and any other devices, directly or via remote connections. The computer processing system may be connected or coupled to one or more other processing systems such as a server 10, other remote computer processing system 14, network storage devices 12, via any one or more of a local Ethernet, WAN connection, Internet, etc. or via any other networking methodologies that connect different computing systems and allow them to communicate with one another. The various functionalities and modules of the systems and methods of the present disclosure may be implemented or carried out distributedly on different processing systems (e.g., 2, 14, 16), or on any single platform, for instance, accessing data stored locally or distributedly on the network.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the singular forms “a”, “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises” and/or “comprising,” when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
The corresponding structures, materials, acts, and equivalents of all means or step plus function elements, if any, in the claims below are intended to include any structure, material, or act for performing the function in combination with other claimed elements as specifically claimed. The description of the present invention has been presented for purposes of illustration and description, but is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the invention. The embodiment was chosen and described in order to best explain the principles of the invention and the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated.
Various aspects of the present disclosure may be embodied as a program, software, or computer instructions embodied in a computer or machine usable or readable medium, which causes the computer or machine to perform the steps of the method when executed on the computer, processor, and/or machine. A program storage device readable by a machine, tangibly embodying a program of instructions executable by the machine to perform various functionalities and methods described in the present disclosure is also provided.
The system and method of the present disclosure may be implemented and run on a general-purpose computer or special-purpose computer system. The computer system may be any type of known or will be known systems and may typically include a processor, memory device, a storage device, input/output devices, internal buses, and/or a communications interface for communicating with other computer systems in conjunction with communication hardware and software, etc.
The terms “computer system” and “computer network” as may be used in the present application may include a variety of combinations of fixed and/or portable computer hardware, software, peripherals, and storage devices. The computer system may include a plurality of individual components that are networked or otherwise linked to perform collaboratively, or may include one or more stand-alone components. The hardware and software components of the computer system of the present application may include and may be included within fixed and portable devices such as desktop, laptop, server. A module may be a component of a device, software, program, or system that implements some “functionality”, which can be embodied as software, hardware, firmware, electronic circuitry, or etc.
The embodiments described above are illustrative examples and it should not be construed that the present invention is limited to these particular embodiments. Thus, various changes and modifications may be effected by one skilled in the art without departing from the spirit or scope of the invention as defined in the appended claims.
This application is related to U.S. patent application Ser. No. ______ (Attorney docket YOR920090615US1(24822)), entitled SELECTIVE AUTOMATED EXPANSION OF STRUCTURED DATA AT DEBUG TIME, filed on Feb. 22, 2010, which is incorporated by reference herein in its entirety.