Edit & Continue - Rude Edits

Edit & Continue - Rude Edits

  • Comments 2

 

by Bill Horst

 

Edit and Continue is a new VB debugging feature which allows the user to make edits to code while the debugger is in "Break Mode" and then to continue debugging with the new edits applied, without having to start execution over again.

A Rude Edit is an edit made during "Break Mode" from which the debugger cannot continue.  In other words, the user must restart the debugging process if they wish to apply a rude edit.  When an edit is rude, it will generate a purple squiggle and an error message to indicate that it is rude.

 

If the user attempts to step or run while there is a rude edit, an error dialog will appear which lets you either edit the code (to get rid of the rude edit) or restart the debugger execution.  Almost all rude edits can be undone.



  • Any edit that produces a compile error is not allowed, because the code no longer makes sense


Types

  • Type (e.g. Class, Interface, Module) definitions cannot be Added, Edited or Removed


Methods/Members

  • Method (e.g. Function) and member (e.g. Dim) definitions cannot be Edited or Removed from a Type Definition



  • Method/Member definitions can be added, but only if they are "Private"


Edits within methods


This is where things are the most interesting with Edit and Continue

  • Editing the an active line (i.e. a line on the call stack) is never allowed. 



  • This also applied to any area that is gray.  For example, edits to a catch block are allowed, unless the active statement is inside the try block


Otherwise, most edits within a method are allowed, with the following exceptions (there may be more I can't think of right now, so don't hold me to this…there's a lot of possible edits!)

  • On Error statements can be edited only if they are in a method not on the call stack
  • Redim statements cannot be removed
  • Editing an Erase statement is not allowed, though you can add and remove them
  • Catch blocks cannot be removed from a method if it is on the call stack

Misc.

  • Edits are not allowed at all within generic type or method definitions


  • Compiler statements (lines starting with #) cannot be Added, Edited or Deleted


  • Imports and Option statements cannot be Added, Edited or Removed
  • Attributes cannot be Added, Edited or Removed


  • Comments can be added, edited or removed, except in regions not allowed as indicated above
Leave a Comment
  • Please add 3 and 5 and type the answer here:
  • Post
  • New feature?
    http://www.shoddycoder.net/PermaLink,guid,3d124f5f-e666-4355-9dd9-bc3274ab72f8.aspx
  • "New" only to people that have never used any previous version of the basic language (let alone any previous version of "Visual" basic)

    My main, long standing, will never ever die gripes about the .Net IDE are....

    Where's my VB5/6 style immediate window? The crude replacement is worthless to me. First of all, it must support blocks of text... not that "single lines only" imposter that's there now. The VB5/6 immediate is like a having version of Notepad that fully understands and supports VB. It's nearly impossible to explain how important this is to a non-basic developer. Forget E&C and give me my immediate window back.

    And, where's an option to show single procedures at a time so the scrollbars and "since day one" edit keys (like Ctrl-Home/Ctrl-End/etc) are usable (and predictable)?
Page 1 of 1 (2 items)