# US 8,572,438 B2 · N-way runtime interoperative debugging

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 8,572,438 B2
- Document ID: US8572438B2
- Status: Granted
- Kind: B2
- Application number: 13/167,729
- Filed: 2011-06-24
- Published: 2012-12-27
- Granted: 2013-10-29
- Earliest claimed: 2011-06-24
- Assignees: Microsoft Corporation
- Applicants: Jackson M. Davis; Gregg Bernard Miskelly
- Inventors: Jackson M. Davis; Gregg Bernard Miskelly
- Web page: https://patentgrep.com/patent/US8572438B2

## CPC

- G06F 11/3698: Environments for analysis, debugging or testing of software
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Simultaneous debugging of code running in multiple types of runtime environment can be performed by an n-way interoperative debugging environment. Code running within a particular runtime can be debugged simultaneously with a code running within other runtimes within a single process. Out-of-process debugging support is provided for inspection and execution control. A compatible debugger or runtime communication protocol is used. Transitions from one runtime to another runtime can be detected. Exceptions thrown in one runtime can be caught by another runtime. Stepping operations can occur in multiple runtimes. A callstack including frames from multiple runtimes can be walked.

## Claims

### Claim 1

A system comprising:
a processor and a memory of a computing device; and
an n-way interoperative debugger comprising a plurality of modules configured to cause the processor of the computing device to interoperatively debug a plurality of n-way interoperative debugger compatible runtime debuggees executing in a single debuggee process, the n-way interoperative debugger providing a holistic view of the single debuggee process, the n-way interoperative debugger comprising:
a stepping manager module comprising a communication channel for the plurality of runtime debuggees, the stepping manager module performing top-level step arbitration comprising:
contacting in priority order at least one of the plurality of runtime debuggees;
receiving a response from a contacted runtime debuggee of the plurality of runtime debuggees claiming ownership of a current debug instruction, the claiming runtime debuggee comprising a current controlling runtime;
notifying the plurality of runtime debuggees of the current controlling runtime; and
a debug monitor module that routes the debug events to a corresponding runtime runtime debugger based on the between the n-way interoperative debugger and the plurality of runtime debuggees to a common protocol.

### Claim 2 (depends on 1)

The system of claim 1, wherein the stepping manager module selects a current controlling runtime for the debug operation by:
contacting in priority order at least one of the plurality of runtime debuggees;
receiving a response from a contacted runtime debuggee of the plurality of runtime debuggees claiming ownership of a current debug instruction, the claiming runtime debuggee comprising a current controlling runtime; and
notifying the plurality of runtime debuggees of the current controlling runtime.

### Claim 3 (depends on 1)

The system of claim 1, wherein at least one of the plurality of runtime debuggees is a virtual machine runtime debuggee.

### Claim 4 (depends on 1)

The system of claim 1, wherein one of the plurality of runtime debuggees is an interpreted runtime debuggee.

### Claim 5 (depends on 1)

The system of claim 1, wherein one of the plurality of runtime debuggees is a native runtime debuggee.

### Claim 6 (depends on 1)

The system of claim 1, wherein no debugging code is executed in the plurality of runtime debuggees.

### Claim 7 (depends on 1)

The system of claim 1, wherein debug operations comprise:
stepping a debuggee code running from one runtime debuggee to another debugging runtime;
setting breakpoints in a plurality of runtime debuggees;
inspecting values from a plurality of runtime debuggees;
executing callstacks comprising code from the plurality of runtime debuggees.

### Claim 8

A method comprising:
receiving by an n-way interoperative debug module executing on a processor, a debug communication from one of a plurality of runtime debuggees executing in a single debug process, the debug communication conforming to a protocol shared by the plurality of runtime debuggees, wherein the plurality of runtime debuggees comprise runtimes that do not execute debug code, detect transitions from one runtime debuggee to another runtime debuggee and detect exceptions thrown in other debugee runtimes;
determining a current controlling runtime, comprising a runtime debuggee of the plurality of runtime debuggees by contacting in priority order at least one of the plurality of runtime debuggees; and
notifying at least one of the plurality of runtime debuggees of the determined current controlling runtime.

### Claim 9 (depends on 8)

The method of claim 8, wherein at least one of the runtime debuggees comprises a virtual machine runtime.

### Claim 10 (depends on 8)

The method of claim 8, wherein one of the runtime debuggees comprises an interpreter runtime.

### Claim 11 (depends on 8)

The method of claim 8, wherein one of the runtime debuggees comprises a native runtime.

### Claim 12 (depends on 8)

The method of claim 8, wherein an exception thrown in one runtime debuggee is caught in another runtime debuggee in the plurality of runtimes.

### Claim 13 (depends on 8)

The method of claim 8, wherein a callstack of the single process comprises frames from the plurality of runtime debuggees.

### Claim 14 (depends on 8)

The method of claim 8, wherein transitions between runtime debuggees are detected.

### Claim 15

A computer-readable storage medium comprising computer-executable instructions which when executed cause at least one processor of a computing device to:
receive by an n-way interoperative debug module executing on the at least one processor, a debug communication from one of a plurality of runtime debuggees executing in a single debugee process, the debug communication conforming to a protocol shared by the plurality of runtime debuggees, wherein the plurality of runtime debuggees comprise runtimes that do not execute debug code, that detect transitions from one runtime debuggee to another runtime debuggee and that detect exceptions thrown in other debugee runtimes;
determine a current controlling runtime, comprising a runtime debuggee of the plurality of runtime debuggees, by contacting in priority order at least one of the plurality of runtime debuggees; and
notify at least one of the plurality of runtime debuggees of the determined current controlling runtime.

### Claim 16 (depends on 15)

The computer-readable storage medium of claim 15, comprising further computer-executable instructions, which when executed cause the at least one processor to:
receive a debug communication from an interpreter runtime debuggee.

### Claim 17 (depends on 16)

The computer-readable storage medium of claim 16, comprising further computer-executable instructions, which when executed cause the at least one processor to:
receive a debug communication from a native runtime debuggee.

### Claim 18 (depends on 15)

The computer-readable storage medium of claim 15, comprising further computer-executable instructions, which when executed cause the at least one processor to:
receive a debug communication from a virtual machine runtime debuggee.

### Claim 19 (depends on 15)

The computer-readable storage medium of claim 15, comprising further computer-executable instructions, which when executed cause at least one processor to:
walk a callstack of the single process, wherein the callstack comprises frames from the plurality of runtime debuggees.

### Claim 20 (depends on 16)

The computer-readable storage medium of claim 16, comprising further computer-executable instructions, which when executed cause at least one processor to:
detect a transition between one of the plurality of runtime debuggees and another of the plurality of runtime debuggees.
