Supported Code Changes (C#)
来源:互联网 发布:mysql连接池配置文件 编辑:程序博客网 时间:2024/06/10 09:19
Edit and Continue handles most types of code changes within method bodies. Most changes outside method bodies, and a few changes within method bodies, cannot be applied during debugging, however. To apply those unsupported changes, you must stop debugging and restart with a fresh version of the code.
The following changes cannot be applied to C# code during a debugging session:
Changes to the current statement or any other active statement.
Active statements include any statements, in functions on the call stack, that were called to get to the current statement.
The current statement is marked by a yellow background in the source window. Other active statements are marked by a shaded background and are read-only. These default colors can be changed in the Options dialog box.
Changes to global symbols, including the following:
Adding new types.
Adding methods to a type.
Changing the signature of a type.
Adding fields, events, or properties to a type.
Editing an anonymous method or any method that contains an anonymous method. These methods are marked by a shaded background.
Adding a new anonymous method.
Adding, removing, or changing attributes.
Adding, removing, or changing using directives.
Removing or changing local variables. Adding local variables is allowed.
Adding a foreach, using, or lock around the active statement.
Modifying a method that contains a yield return or yield break statement.
Changing a constructor with a field that is initialized by an anonymous method.
Changes to unsafe code have the same limitations as changes to safe code, with one additional restriction:
Edit and Continue does not support changes to unsafe code that exits within a method that contains the stackalloc operator. This applies only to active methods. When you are debugging, any function currently on the call stack is an active function.
Edit and Continue supports changes to catch, finally,and try blocks, with some exceptions for blocks in active methods, such as methods that are currently on the call stack.
In an active function that is the most recent function on the call stack, Edit and Continue does not support:
Adding a catch or finallyblock around the active statement.
Adding nested exception handlers with nesting levels greater than six.
In an active function that is not the most recent function on the call stack, Edit and Continue does not support:
Adding a catch, finally or tryblock around the active statement.
Adding nested exception handlers with nesting levels greater than six.
Changing code within a tryblock that contains the active statement.
Edit and Continue is not available in the following debugging scenarios:
Debugging LINQ code. For more information, see Debugging LINQ.
Mixed-mode (native/managed) debugging.
SQL debugging.
Debugging a Dr. Watson dump.
Editing code after an unhandled exception, when the "Unwind the call stack on unhandled exceptions" option is not selected.
Debugging an embedded runtime application.
Debugging an application that has Attach to instead of running the application by choosing Start from the Debug menu.
Debugging optimized code.
Debugging an old version of your code after a new version failed to build because of build errors.
Tasks
Reference
- Supported Code Changes (C#)
- 【入驻杂谈】Code Changes World.
- your app does not have the latest code changes because ..
- stack changes when calling function in c
- informix库报错:Encoding or code set not supported
- FAILED: Fetch statement failed: Encoding or code set not supported
- C/C++code知识点
- [Code Sample]Alert "Do you want to save the changes you have made?"
- MyEclipse "Some code changes cannot be hot swapped into a running virtual machine"
- Error watching file for changes: EMFILE {"code":"EMFILE","errno":错误解决办法【ReactNative】
- fcm code C代码
- 精致的C Code
- [C++]Ftp keylogger Code
- C/C++ PING code
- KMP C Code
- Objective-c Code Style
- Obj-C code
- Code Forces #5C
- WIN32项目和Win32控制台应用程序区别
- 山东理工ACM【2105】小泉的难题
- NYOJ 623 A*B ProblemII
- Redis内存使用优化与存储
- Python装饰器学习
- Supported Code Changes (C#)
- poj 3407 Brookebond s'en va en guerre... && poj 2354 Titanic
- WINCE创建动态连接库
- SDL移植到ARM-linux下
- 山东理工ACM【1135】C/C++经典程序训练5---图形打印问题
- RadioGroup变为按钮工具条
- 在你步入职业软件开发生涯那天起就该知道的五件事
- java多线程中的 toSring 方法和setPriority方法
- HDU 4268-Alice and Bob( STL: set)