IP Library › Granted Patent US 8,261,240
Granted Patent B2
US 8,261,240 · App. 12/014,097 · Granted Sep 4, 2012

Debugging lazily evaluated program components

Assignee: Microsoft Corporation
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,261,240
App. No.
12/014,097
Granted
Sep 4, 2012
Kind
B2
Abstract

A system and method for facilitating debugging of a computer program is provided. Mechanisms of the present invention facilitate presenting information and enable a developer to interact with a lazily evaluated program component. A debugging system may display data associated with a lazily evaluated program component, and may enable the programmer to control evaluation and viewing of elements of the lazily evaluated program component. In response to a user command, a debugging system may evaluate elements of the program component and display associated data. A user interface enables a user to view, interact with, and debug lazily evaluated program components as well as a program containing such components.

Claims (41)

1. A method of facilitating debugging of a computer program, comprising:

a) executing a portion of the computer program having a program component;

b) determining whether the program component is a lazily evaluated component; and

c) if the program component is determined to be a lazily evaluated component, performing the actions of:

displaying a first representation of the program component representative of a deferred evaluation;

receiving a user command to evaluate the program component;

in response to receiving the user command to evaluate the program component, evaluating at least one element of the program component and displaying a second representation of the program component including a representation of the at least one element of the program component; and

after displaying the second representation of the program component, resuming execution of the portion of the computer program and disabling an automatic evaluation of the at least one element of the program component.

2. The method of claim 1 , further comprising selectively terminating the evaluation of the at least one element of the program component based on an occurrence of a timeout.

3. The method of claim 1 , wherein determining whether the program component is a lazily evaluated component is based on at least one of determining whether the program component is an iterator object, determining whether the program component is a concrete collection, or determining whether the program component has an associated display proxy.

4. The method of claim 1 , wherein: a) displaying the first representation of the program component comprises displaying a results view node as an expandable node in a hierarchical display structure; and b) displaying the second representation of the program component comprises displaying the at least one element of the program component as at least one child node of the results view node.

5. The method of claim 1 , further comprising in response to receiving a user refresh command and a specification of an element of the at least one element of the program component, evaluating the specified element and updating at least a portion of the representation of the at least one element of the program component corresponding to the specified element.

6. The method of claim 1 , further comprising for each element of the at least one element of the program component, selectively providing an indication that data corresponding to the element is stale.

7. The method of claim 1 , wherein displaying the first representation of the program component employs a debug proxy associated with the program component.

8. A computer readable medium having stored thereon computer executable instructions for performing the method of claim 1 .

9. A system for facilitating debugging of a computer program, comprising:

a) a user interface component;

b) a debugger that is configured to perform actions, including:

i. receiving data associated with a program component of the computer program; and

ii. if the program component specifies a deferred evaluation:

displaying a portion of data associated with the program component;

receiving a user command to perform the deferred evaluation;

in response to receiving the user command to perform the deferred evaluation, performing at least a portion of the deferred evaluation and displaying additional data representative of the deferred evaluation; and

after displaying the additional data representative of the deferred evaluation, in response to a resume command, executing at least a portion of the computer program and providing an indication that the additional data representative of the deferred evaluation includes stale data; and

c) one or more processors for implementing the debugger.

10. The system of claim 9 , the actions further comprising selectively terminating performing the at least a portion of the deferred evaluation based on a user command.

11. The system of claim 9 , the actions further comprising selectively terminating performing the at least a portion of the deferred evaluation based on an occurrence of a timeout.

12. The system of claim 9 , the actions further comprising determining whether the program component specifies a deferred evaluation at least partly based on whether the program component is an enumerable object.

13. The system of claim 9 , the actions further comprising displaying the portion of the data associated with the program component and the additional data representative of the deferred evaluation in a hierarchical interface, the additional data representative of the deferred evaluation presented at a lower level of the hierarchical interface than the portion of the data associated with the program component.

14. The system of claim 9 , wherein performing the at least a portion of the deferred evaluation comprises sending, to a remote computing device, a command to perform a query.

15. A system for facilitating debugging of a computer program, comprising:

a) a user interface that displays data associated with an object at a breakpoint in the computer program;

b) evaluation means for:

i. determining whether the object has associated instructions that perform a deferred evaluation, the evaluation means for determining whether the object has associated instructions that perform a deferred evaluation is based on at least one of determining whether the object is an iterator object, determining whether the object is a concrete collection, or determining whether the object has an associated display proxy; and

ii. if the object has associated instructions that perform a deferred evaluation:

receiving a user command to perform the deferred evaluation; and

in response to receiving the user command to perform the deferred evaluation, performing the deferred evaluation, the evaluation means comprising at least one processor; and

c) means for presenting data obtained from performing the deferred evaluation.

16. The system of claim 15 , the means for presenting data selectively indicates that elements of the presented data are stale.

17. The system of claim 15 , wherein the means for presenting data, in response to obtaining zero elements, provides an indication that zero elements have been obtained.

18. The system of claim 15 , wherein the user interface displays the data in one or more nodes of a hierarchical structure including a results node representative of results of the deferred evaluation, the evaluation means performs the deferred evaluation in response to a user command to expand the results node, and the means for presenting data presents the data in at least one child node of the results node.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 9, 2014
From: MICROSOFT CORPORATION
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 034542/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 13, 2008
From: HOBAN, LUCAS; CHOUDHARY, SREEKAR
To: MICROSOFT CORPORATION
Reel/Frame 020500/0972 →
Continuity (1)
Related Publication 20090183142A1 · Jul 16, 2009