зеркало из https://github.com/dotnet/roslyn.git
Страница:
EnC Supported Edits
Страницы
API Changes
Branch Cleanup
Building Testing and Debugging
C# Interactive Walkthrough
Changelog for C# and VB compilers
Compiler Queries
Compiler release process
Compiler supporting types
Contributing Code
Diagnosing Project System Build Errors
EnC Supported Edits
FAQ
Getting Started C# Semantic Analysis
Getting Started C# Syntax Analysis
Getting Started C# Syntax Transformation
Getting Started VB Semantic Analysis
Getting Started VB Syntax Analysis
Getting Started VB Syntax Transformation
Getting Started Writing a Custom Analyzer & Code Fix
Getting Started on Visual Studio 2015 CTP 5
Getting Started on Visual Studio 2015 CTP 6
Getting Started on Visual Studio 2015 Preview
Getting Started on Visual Studio 2015 RC
Getting Started on Visual Studio 2015
Home
How To Investigate CI Test Failures
How To Write a C# Analyzer and Code Fix
How To Write a Visual Basic Analyzer and Code Fix
How to support new C# language features by Edit And Continue (ENC)
Interactive Window
Labels used for issues
Languages features in C# 6 and VB 14
Linux Instructions
Manual Testing
Measuring Compiler Performance
New Language Features in C# 6
New Language Features in VB 14
Notes on formatting
Notes on nullability
NuGet packages
Performance Investigations
Performance considerations for large solutions
Recording performance traces with PerfView
Reporting Visual Studio crashes and performance issues
Responding to customers encountering crashes or performance issues
Roadmap
Roslyn Overview
Runtime code generation using Roslyn compilations in .NET Core App
Samples and Walkthroughs
Scripting API Samples
Syntax Visualizer
Troubleshooting tips
VS 2015 CTP 5 API Changes
VS 2015 CTP 6 API Changes
VS 2015 RC API Changes
Walkthroughs
11
EnC Supported Edits
Tomáš Matoušek редактировал(а) эту страницу 2017-05-12 14:24:16 -07:00
Supported Edits in Edit & Continue (EnC)
Edit & Continue lets you modify/add to your source code in break-mode while debugging without ever having to restart your debugging session.
Definitions
- Variable Capturing is the mechanism in which the lambda/delegate which is defined inline is able to hold on to any variables within its lexical scope
- Scope is the region of program text within which it is possible to refer to the entity declared by the name without qualification of the name
- Debug statement is a span of instructions delimited by subsequent sequence points. Usually a debug statement corresponds to a language statement, but it might correspond to just a part of a language statement (e.g. an opening brace of a block statement), an expression (e.g. lambda body) or other contiguous syntax (base constructor call).
- Internal active statement is a debug statement that contains a return address of a stack frame.
- Leaf active debug statement is a debug statement that contains an IP (instruction pointer) of any thread.
Supported Edits
Edit operation | Additional Info |
---|---|
Add methods, fields, constructors, properties, events, indexers, field and property initializers, nested types and top-level types (including delegates, enums, interfaces, abstract and generic types, and anonymous types) to an existing type | The existing type cannot be a generic or an interface. Adding or modifying enum members within an existing enum is not supported. |
Add and modify iterators | Changing a regular method to an iterator method is supported |
Add async/await expressions | Adding an await expression into an existing async method is not supported. Adding an await expression around an active statement is not supported. Changing a regular method to async is supported. |
Modify async/await expressions | Modifying await expressions wrapped inside other expressions (e.g. G(await F()); ) is not supported |
Add and modify operations with dynamic objects | - |
Add and modify C# 6.0 language features like string interpolation and null-conditional operators | - |
Add lambda expressions | Lambda expressions can only be added if they are static, access the “this” reference that has already been captured, or access captured variables from a single scope |
Modify lambda expressions | The following rules guarantee that the structure of the emitted closure tree will not change--thus ensuring that lambdas in the new body are mapped to the corresponding generated CLR methods that implemented their previous versions:
|
Add LINQ expressions | LINQ expressions contain implicitly-declared anonymous functions. This means the edit rules for lambdas and LINQ will be the same. |
Modify LINQ expressions | LINQ expressions contain implicitly-declared anonymous functions. This means the edit rules for lambdas and LINQ will be the same. |
Modifying async lambda and LINQ expressions in combination | You can edit various nested expressions provided that they otherwise satisfy the EnC rules |
Not Supported Edits
Edit operation | Additional Info |
---|---|
Modify method signatures | - |
Add or modify generics | - |
Modify interfaces | - |
Add a method body such that an abstract method becomes non-abstract | - |
Add new abstract, virtual, or override member to a type | You CAN add a non-abstract member to an abstract type |
Add destructor to an existing type | - |
Modify a type parameter, base type, delegate type, or return type of an event/property/operator/indexer | - |
Modify a catch-block if it contains an active statement (leaf or internal) | - |
Modify a try-catch-finally block if the finally clause contains an active statement | - |
Renaming of any kind | - |
Delete members, types, namespaces | - |
Delete entire method bodies | Not supported because deleting an entire method body would make the method “abstract”—which is not currently supported |
Add using statements | - |
Add a namespace | - |
Edit a member referencing an embedded interop type | - |
Edit a member with On Error or Resume statements | Specific to Visual Basic |
Edit a member containing an Aggregate, Group By, Simple Join, or Group Join LINQ query clause | Specific to Visual Basic |
Edit an async method/lambda in a project that doesn't define or reference AsyncStateMachineAttribute type (e.g. projects targeting .NET Framework 4.0 and lower) | - |
Edit an iterator method/lambda in a project that doesn't define or reference IteratorStateMachineAttribute type (e.g. projects targeting .NET Framework 4.0 and lower) | - |
App Model EnC Support
Support EnC | Do Not Support EnC |
---|---|
|
|
Performance considerations for large solutions
Other documentation in the repo
Contributors
Building, Testing, and Debugging
Tool Authors
Status
Edit-and-Continue Supported Edits
.NET Core
Interactive and Scripting
Interactive Window Documentation