42.4. Edit and Continue

One of the most useful features of Visual Studio 2008 debugging is Edit and Continue. Both C# and Visual Basic have support for Edit and Continue, enabling you to make changes to your application on the fly. Whenever your application is paused, you can make changes to your code and then resume execution. The new or modified code is dynamically added to your application, with the changes taking immediate effect.

42.4.1. Rude Edits

At this point, you are likely wondering whether there are any limitations on the changes that you can make. The answer is yes, and there are quite a few types of rude edits, which refer to any code change that requires the application to be stopped and rebuilt. A full list of rude edits is available from the Visual Studio 2008 help resource under the Edit and Continue topic, but they include the following:

  • Making changes to the current, or active, statement

  • Changes to the list of global symbols — such as new types or methods — or changing the signatures of methods, events, or properties

  • Changes to attributes

42.4.2. Stop Applying Changes

When changes are made to the source code while the application is paused, Visual Studio has to integrate, or apply, the changes into the running application. Depending on the type or complexity of the changes made, this could take some time. If you wish to cancel this action, you can select Stop Applying Code Changes from the Debug menu.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.241.250