The present invention relates to the debugging of software and various software components and more particularly to managing various debugging tools in integrated development environments.
A debugger (or debugging tool) is a computer program that is used to debug (and in some cases test or optimize) other computer programs. When the computer program crashes, the debugger generally shows the offending position or location in the original code (for source-level debuggers). A crash occurs when the computer program cannot continue because of a programming bug. Typically, debuggers offer functions such as running a program step by step (single stepping), stopping (breaking) at a particular event and tracking the values of variables.
Many software systems (multi-threaded or distributed systems) are written in more than one programming language. For example, a system may be implemented in Java with another language running on top of Java that needs to be debugged. Further difficulties are presented due to the lack of standardization in terms of internal structures, such as stack frames, between different programming languages.
For example, in business integration tooling, there are often different language debugger tools running on different debug runtime/test environments. In the tooling, each debugger would have its own way to show its suspended thread and stack frame. Each debugger may not know the existence of the other one. These situations create significant difficulties for software developers attempting to debug these systems.
Consequently, there exists an ongoing need for debugging technology that facilitates efficient programming by way of language, debug tool, host application and operating environment independence.
Methods and systems for use in a debugging environment that can be used by software developers working on multi-computer program language environments are described. The techniques used create a common debug adaptor that manages various debug tools (each associated with a different computer language) to provide merged information from debug events to enable debugging between multi-languages in a multi-language environment.
Certain exemplary embodiments can provide a method of debugging in a multi-computer program language environment, the method comprising: registering a plurality of debug tools associated with different programming languages in the multi-computer program language environment, each one of the plurality of debug tools providing suspended threads and stack frames in response to a debug event in the multi-computer program language environment; receiving the suspended threads and stack frames from the plurality of debug tools; correlating the received suspended threads and stack frames under a common suspended thread; and providing the common suspended thread in a debug view.
Certain exemplary embodiments can provide a system for debugging in a multi-computer program language environment, the system comprising: a registry module for registering a plurality of debug tools associated with different programming languages in the multi-computer program language environment, each one of the plurality of debug tools providing suspended threads and stack frames in response to a debug event in the multi-computer program language environment; a correlation module for receiving the suspended threads and stack frames from the plurality of debug tools and correlating the received suspended threads and stack frames under a common suspended thread; and a user interface module for providing the common suspended thread in a debug view.
Certain exemplary embodiments can provide a computer program product for debugging in a multi-computer program language environment, the product comprising: a registry mechanism that is executable on the computer program for registering a plurality of debug tools associated with different programming languages in the multi-computer program language environment, each one of the plurality of debug tools providing suspended threads and stack frames in response to a debug event in the multi-computer program language environment; a correlation mechanism that is executable on the computer program for receiving the suspended threads and stack frames from the plurality of debug tools and correlating the received suspended threads and stack frames under a common suspended thread; and a user interface mechanism that is executable on the computer program for providing the common suspended thread.
Certain exemplary embodiments can provide an apparatus for debugging in a multi-computer program language environment, the apparatus comprising: a processor; a memory coupled to the processor; a computer program residing in the memory; a common debug adaptor residing in the memory and executed by the processor; the common debug adaptor comprising: a registry module for registering a plurality of debug tools associated with different programming languages in the multi-computer program language environment, each one of the plurality of debug tools providing suspended threads and stack frames in response to a debug event in the multi-computer program language environment; a correlation module for receiving the suspended threads and stack frames from the plurality of debug tools and correlating the received suspended threads and stack frames under a common suspended thread; and a user interface module for providing the common suspended thread.
Computing System Environment—
The computing system environment 100 includes a general purpose computing device 102. Components of the computing device 102 include, but are not limited to, a processing unit 104, an input/output interface 106, a system memory 108, and a system bus 110. The system bus 110 communicatively connects the aforementioned components and numerous other (not shown) cooperatively interactive components. The input/output interface 106 interacts with external components through an input/output unit 112 (which can include keyboard, mouse-type controllers, monitors, media readers/writers and the like). The system memory 108 instantiates various components and operations of a common debug adaptor 202 according to embodiments of the present invention described in detail in subsequent figures. The computing system environment 100 serves as an apparatus for performing common debug adaptor processes.
Architectural and Process Overview—
Some embodiments will include one or more of the functional components/modules/mechanisms or process steps described. Any particular embodiment may not require all of the components or steps described, may use additional components or steps, or may use an entirely different organization without change the functionality, scope or spirit.
With reference to
Debug Tools 204, 206, 208
Each debug tool 204-208 represents an external tool written to run on its own runtime (i.e., environment/software under test). Each debug tool 204-208 is identified by an identifier (pluginID). Each debug tool 204-208 can also (a) identify a server (not shown) it is debugging (EngineID); (b) identify an original instance it is running from (Global Instance ID—GIID); and (c) identify a thread (a sequence of instructions) it is running at (ThreadID).
A debug view (native to each debug tool 204-208 and not shown in the drawings) would show (a) a launcher, (b) a debug target, and (c) a thread and stack frame at which its breakpoint is suspended.
Registry Module 210
The registry module 210 registers each debug tool 204-208 to the common debug adaptor 202 by receiving pluginID type information through a receiving mechanism 216. In particular, each participating debug tool 204-208 extends the common debug adapter 202 extension point. An extension point is similar to a plug-in and adds an extra feature to a programming language or system using well established techniques in the field of the invention. Each debug tool 204-208 creates and returns a debug target, suspended threads and stack frames to the common debug adapter 202 for handling in response to one or more debug events originating from environment/software under test.
Correlation Module 212
The correlation module 212 accommodates non-Java and Java debug tools 204-208 and enables various types of stack frames to be correlated/merged. In general, the individual debug tools 204-208 routes debug events for mixed stack frame handling to the correlation module 212 of the CDA 202. A debug event is a run-time altering condition, such as a breakpoint, that is set in an application by a debugging environment user and managed by an active debugging environment that controls the running of an application. Debug events are defined by the individual debug tool 204-208.
The correlation module 212 groups the various suspended threads and stack frames from the debug tools 204-208 using a grouping mechanism 218. The grouping is determined by one or more of the EngineID, the GIID and the ThreadID described above. In one particular example, the correlation module 212: (i) creates a launcher for each EngineID; (ii) creates a debug target for each GIID; and (iii) groups debug events from the various debug tools 204-208 with the same ThreadID into stack frames under a common suspended thread.
User Interface 214
The UI module 214 controls the display and management of information, such as the common suspended thread, that is provided in a debug view (example provided in
Process/System Example—
A process 300 (
For the purpose of illustration in
BPEL is an XML-based language for standardizing business processes in a distributed or grid computing environment that enables separate businesses to interconnect their applications and share data. Platform-independent BPEL allows enterprises to keep internal business protocols separate from cross-enterprise protocols so that internal processes can be changed without affecting the exchange of data from enterprise to enterprise. A BPEL document, for example, keeps track of all the business processes that are connected to a transaction and ensures that the processes are executed in the correct order through the automation of messages.
The BSM and transforms debuggers 206 and 208 are examples of other debuggers that participate through the registry module 210 of the CDA 202 and are known in the art.
The JDM 402 is mainly used to filter Java debug events that would be relevant. The JDM 402 forwards a current Java debug event (JDE) to the CDA 202 and determines whether the JDE is from any of the debug tools 204-208. If so, the JDM 402 would receive correlation information on the JDE to enable delegation (as discussed above) to one of the debug tools 204 to 208 to handle the JDE and return the corresponding stack frames.
With reference to
The correlation module 212 of the CDA 202 analyzes data from the information vectors 308 and delegates event tasks 310 to the debug tools 204-208 as described above. The analysis step 308 involves grouping suspended threads and stack frames into a common stack frame based on one or more of the EngineID, the GIID and the ThreadID as discussed in conjunction with the correlation module 212 of
If all the debug events received (at step 302) from the test environment 404 have not been processed, as determined at step 312, then processing returns to step 304. If all the debug events received (at step 302) from the test environment 404 have been processed, as determined at step 312, processing continues to step 314 to construct a debug tree, which includes the common suspended thread.
The UI module 214 constructs the debug tree in a debug view by showing a launcher with EngineID information. The launcher includes a debug target with GIID as the identifier. The debug tree also includes various threads with the ThreadIDs and corresponding stack frames under each ThreadID (see
When considering the JDM 402 (
The result of the query is returned to the JDM 402 which combines the event with other debug information (e.g., information vectors) and route the information to the CDA 202 for handling. The CDA 202 would in-turn delegate any required handling back to one of the debug tools 204-208 as required. The individual debug tools 202-208 handles the Java mixed stack frame by identifying where the Java code is called from. The results from the debug tools 202-208 are rerouted to the CDA 202 for further mixed stack frame handling if required. The CDA 202 then provides the complete merged stack frame (as the common suspended stack frame) in the debug view (through the UI module 214) as previously discussed.
Debug Tree Example—
Assuming a server (not shown) in the test environment 404 (e.g., business integration tool) is started in a debug mode and appropriate breakpoints have been added, various breakpoints would occur. If a breakpoint occurs at a first component (in the test environment 404) which is called by a second component (in the test environment 404) a merged stack frame will be shown under the wiring thread in a debug tree 500 shown in
The debug tree 500 illustrates that all stack frames from the debug tools (e.g., tools 204-208) have the same GIID (not illustrated but used internally) and ThreadID (e.g., 1234). If any stack frame has a different ThreadID, those stack frames would appear under another thread in the debug target. The UI module 214 can progressively disclose such that only relevant debug elements are shown in the debug tree 500. In the example of
In summary, embodiments of the common debug adapter 202 are generic for different debug tools 204-208 and test environments 404 (i.e., runtimes). In practical implementation, each debug tool 204-208 implements an extension point to integrate with the system 400.
The detailed description does not limit the implementation of the embodiments of the present invention to any particular computer programming language. The computer program product may be implemented in many computer programming languages provided that the OS (Operating System) provides the facilities that may support the requirements of the computer program product. An exemplary embodiment of the present invention can be implemented in the C or C++ computer programming language, or may be implemented in any other mix of supported programming languages. Any limitations presented would be a result of a particular type of operating system, computer programming language, or database management system and would not be a limitation of the embodiments of the present invention described herein.
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/CA2005/001380 | 9/9/2005 | WO | 00 | 3/6/2008 |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2007/028227 | 3/15/2007 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
5151991 | Iwasawa et al. | Sep 1992 | A |
5953530 | Rishi et al. | Sep 1999 | A |
6016474 | Kim et al. | Jan 2000 | A |
6042614 | Davidson et al. | Mar 2000 | A |
6158045 | You | Dec 2000 | A |
6282701 | Wygodny et al. | Aug 2001 | B1 |
6349406 | Levine et al. | Feb 2002 | B1 |
6353923 | Bogle et al. | Mar 2002 | B1 |
6480818 | Alverson et al. | Nov 2002 | B1 |
6507805 | Gordon et al. | Jan 2003 | B1 |
6601189 | Edwards et al. | Jul 2003 | B1 |
6651243 | Berry et al. | Nov 2003 | B1 |
6658652 | Alexander et al. | Dec 2003 | B1 |
6721941 | Morshed et al. | Apr 2004 | B1 |
6728949 | Bryant et al. | Apr 2004 | B1 |
6754890 | Berry et al. | Jun 2004 | B1 |
7203926 | Bogle et al. | Apr 2007 | B2 |
7299454 | Pugh et al. | Nov 2007 | B2 |
7340731 | Laura | Mar 2008 | B2 |
7383540 | Kalra | Jun 2008 | B2 |
7500226 | Tillmann et al. | Mar 2009 | B2 |
7823131 | Gard et al. | Oct 2010 | B2 |
7992133 | Theroux et al. | Aug 2011 | B1 |
8032872 | Violleau et al. | Oct 2011 | B2 |
Number | Date | Country |
---|---|---|
1220099 | Mar 2002 | EP |
WO 0169390 | Sep 2001 | WO |
Number | Date | Country | |
---|---|---|---|
20080263522 A1 | Oct 2008 | US |