Method and system for program editing and debugging in a common language runtime environment
First Claim
1. A computer-readable storage medium containing executable components that when executed on one or more processors implement an integrated development environment and a common language runtime environment, comprising:
- a source code component comprising high-level source code of a computer software program;
an assembly comprising an intermediate language component and metadata associated with the source code component, the intermediate language component is compiled to create native code associated with the software program;
a user interface that facilitates debugging of the software program;
an application program interface as part of the integrated development environment that facilitates communication between the user and a common language runtime environment running native code, the integrated development environment receiving a breakpoint event from the common language runtime environment when the native code is suspended at a breakpoint, facilitating editing of the high-level source code, determining legality of an edit as each change associated with the edit is made, building the edit when it is determined to be legal, sending information associated with the edited software program to the common language runtime environment after the edit is determined by the integrated development environment to be legal, and facilitating execution of the edited software program in the common language runtime environment, wherein the edit is determined to be legal when the integrated development environment determines that the common language runtime environment can apply the edits without error; and
an edit and continue component as part of the common language runtime environment that, in response to receiving notification of an edit to a function associated with the high-level source code from the integrated development environment while the associated native code is running, suspends execution of the native code at a breakpoint, sends notification of the suspension to the integrated development environment, provides current instruction pointer information for a pre-edited version of the function, and receives new instruction pointer information associated with a new version of the function, the common language runtime environment continuing execution of the native code from the breakpoint until a remap breakpoint is reached and subsequently performing a remap operation to facilitate continued execution based on the new instruction pointer information.
2 Assignments
0 Petitions
Accused Products
Abstract
A system and method of providing edit and continue support in a software program debugging environment. “Edit and continue” support allows a user (e.g., programmer and/or developer) to update the code and/or data structure(s) of an executing program while it is running. After the user has finished editing their code and resumes execution, an integrated development environment (IDE) propagates the edit(s) into a common language runtime (CLR) environment before continuing. Therefore, from the CLR environment'"'"'s perspective, an edit is a block of intermediate language code (IL) and/or metadata that is inserted into a running process. Moreover, The IDE can facilitate: determining “legality” of an edit; building the edit; sending the edit to the CLR environment; and/or, facilitating the CLR environment switch execution to the edited code.
-
Citations
16 Claims
-
1. A computer-readable storage medium containing executable components that when executed on one or more processors implement an integrated development environment and a common language runtime environment, comprising:
-
a source code component comprising high-level source code of a computer software program; an assembly comprising an intermediate language component and metadata associated with the source code component, the intermediate language component is compiled to create native code associated with the software program; a user interface that facilitates debugging of the software program; an application program interface as part of the integrated development environment that facilitates communication between the user and a common language runtime environment running native code, the integrated development environment receiving a breakpoint event from the common language runtime environment when the native code is suspended at a breakpoint, facilitating editing of the high-level source code, determining legality of an edit as each change associated with the edit is made, building the edit when it is determined to be legal, sending information associated with the edited software program to the common language runtime environment after the edit is determined by the integrated development environment to be legal, and facilitating execution of the edited software program in the common language runtime environment, wherein the edit is determined to be legal when the integrated development environment determines that the common language runtime environment can apply the edits without error; and an edit and continue component as part of the common language runtime environment that, in response to receiving notification of an edit to a function associated with the high-level source code from the integrated development environment while the associated native code is running, suspends execution of the native code at a breakpoint, sends notification of the suspension to the integrated development environment, provides current instruction pointer information for a pre-edited version of the function, and receives new instruction pointer information associated with a new version of the function, the common language runtime environment continuing execution of the native code from the breakpoint until a remap breakpoint is reached and subsequently performing a remap operation to facilitate continued execution based on the new instruction pointer information. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
-
-
14. A method implemented in one or more computers for facilitating programming editing comprising:
-
compiling an intermediate language component to create native code; executing a first portion of native code in a common language runtime environment; suspending execution of the native code at a breakpoint to create a breakpoint event; sending the breakpoint event to an integrated development environment; receiving the breakpoint event at the integrated development environment; requesting edit and continue state information from the common language runtime environment; receiving an edit to a function of a source code component at the integrated development environment; determining whether the edit is legal, wherein the edit is determined to be legal when the edits are capable of being applied and run without error; and
,when the edit is determined to be legal; updating metadata in the common language runtime environment based on the edit; updating the intermediate language component based on the edit; committing the change; continuing execution of the native code from the breakpoint until a remap breakpoint is reached at a remap breakpoint event; receiving the remap breakpoint event at the common language runtime environment; providing current instruction pointer information for a pre-edit function to the integrated development environment; providing a modified instruction pointer for the edited function to the integrated development environment; and
,performing a remap operation using the modified instruction pointer. - View Dependent Claims (15)
-
-
16. A system that facilitates program editing, the system comprising one or more processors executing computer-executable instructions to implement steps of:
-
compiling an intermediate language component to create native code; executing a first portion of native code in a common language runtime environment; suspending execution of the native code at a breakpoint to create a breakpoint event; sending the breakpoint event to an integrated development environment; receiving the breakpoint event at the integrated development environment; requesting edit and continue state information from the common language runtime environment; receiving an edit to a function of a source code component at an integrated development language environment; confirming the legality of the edit; updating metadata in the common language runtime environment based on the edit; updating the intermediate language component based on the edit; committing the edit; continuing execution of the native code from the breakpoint in the common language runtime environment until a remap breakpoint is reached at a remap breakpoint event; receiving the remap breakpoint event at the common language runtime environment; providing current instruction pointer information for a pre-edited version of the function to the integrated development environment; sending a modified instruction pointer for the edited version of the function from the integrated development environment to the common language runtime environment; and performing a remap operation using the modified instruction pointer.
-
Specification