{"id":6923,"date":"2005-11-10T15:33:00","date_gmt":"2005-11-10T15:33:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/vbteam\/2005\/11\/10\/edit-continue-rude-edits\/"},"modified":"2024-07-05T14:53:28","modified_gmt":"2024-07-05T21:53:28","slug":"edit-continue-rude-edits","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/vbteam\/edit-continue-rude-edits\/","title":{"rendered":"Edit &#038; Continue &#8211; Rude Edits"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>by Bill Horst<\/p>\n<p>&nbsp;<\/p>\n<p><span>Edit and Continue<\/span> is a new VB debugging feature which allows the user to make edits to code while the debugger is in &#8220;Break Mode&#8221; and then to continue debugging with the new edits applied, without having to start execution over again.<\/p>\n<p>A <span>Rude Edit<\/span> is an edit made during &#8220;Break Mode&#8221; from which the debugger cannot continue.<span>&nbsp; <\/span>In other words, the user must restart the debugging process if they wish to apply a rude edit.<span>&nbsp; <\/span>When an edit is rude, it will generate a purple squiggle and an error message to indicate that it is rude.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/vbide.members.winisp.net\/blog\/whorst\/Img1.JPG\">&nbsp;<\/p>\n<p>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.<span>&nbsp; <\/span><span>Almost<\/span> all rude edits can be undone.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/vbide.members.winisp.net\/blog\/whorst\/Img2.JPG\"><\/p>\n<ul type=\"disc\">\n<li><span>Any edit that produces a compile error is not allowed, because the code no longer makes sense<\/span><\/li>\n<\/ul>\n<p>Types<\/p>\n<ul type=\"disc\">\n<li><span>Type (e.g. Class, Interface, Module) definitions cannot be Added, Edited or Removed<\/span><\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"http:\/\/vbide.members.winisp.net\/blog\/whorst\/Img3.JPG\"><\/p>\n<p>Methods\/Members<\/p>\n<ul type=\"disc\">\n<li><span>Method (e.g. Function) and member (e.g. Dim) definitions cannot be Edited or Removed from a Type Definition<\/span><\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"http:\/\/vbide.members.winisp.net\/blog\/whorst\/Img4.JPG\"><\/p>\n<ul type=\"disc\">\n<li><span>Method\/Member definitions can be added, but only if they are &#8220;Private&#8221;<\/span><\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"http:\/\/vbide.members.winisp.net\/blog\/whorst\/Img5.JPG\"><\/p>\n<p>Edits within methods<\/p>\n<p>This is where things are the most interesting with Edit and Continue<\/p>\n<ul type=\"disc\">\n<li><span>Editing the an active line (i.e. a line on the call stack) is never allowed.<span>&nbsp; <\/span><\/span><\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"http:\/\/vbide.members.winisp.net\/blog\/whorst\/Img6.JPG\"><img decoding=\"async\" src=\"http:\/\/vbide.members.winisp.net\/blog\/whorst\/Img7.JPG\"><\/p>\n<ul type=\"disc\">\n<li><span>This also applied to any area that is gray.<span>&nbsp; <\/span>For example, edits to a catch block are allowed, unless the active statement is inside the try block<br \/><\/span><\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"http:\/\/vbide.members.winisp.net\/blog\/whorst\/Img8.JPG\"><\/p>\n<p>Otherwise, most edits within a method are allowed, with the following exceptions (there may be more I can&#8217;t think of right now, so don&#8217;t hold me to this&hellip;there&#8217;s a lot of possible edits!)<\/p>\n<ul type=\"disc\">\n<li><span>On Error statements can be edited only if they are in a method not on the call stack<\/span>\n<\/li>\n<li><span>Redim statements cannot be removed<\/span>\n<\/li>\n<li><span>Editing an Erase statement is not allowed, though you can add and remove them<\/span>\n<\/li>\n<li><span>Catch blocks cannot be removed from a method if it is on the call stack\n<p><\/span><\/li>\n<\/ul>\n<p>Misc.<\/p>\n<ul type=\"disc\">\n<li><span>Edits are not allowed at all within generic type or method definitions<br \/><\/span><\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"http:\/\/vbide.members.winisp.net\/blog\/whorst\/Img9.JPG\"><\/p>\n<ul type=\"disc\">\n<li><span>Compiler statements (lines starting with #) cannot be Added, Edited or Deleted<br \/><\/span><\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"http:\/\/vbide.members.winisp.net\/blog\/whorst\/Img10.JPG\"><\/p>\n<ul type=\"disc\">\n<li><span>Imports and Option statements cannot be Added, Edited or Removed<br \/><\/span><\/li>\n<\/ul>\n<ul type=\"disc\">\n<li><span>Attributes cannot be Added, Edited or Removed<br \/><\/span><\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"http:\/\/vbide.members.winisp.net\/blog\/whorst\/Img11.JPG\"><\/p>\n<ul type=\"disc\">\n<li><span>Comments can be added, edited or removed, except in regions not allowed as indicated above<\/span><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; by Bill Horst &nbsp; Edit and Continue is a new VB debugging feature which allows the user to make edits to code while the debugger is in &#8220;Break Mode&#8221; 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 [&hellip;]<\/p>\n","protected":false},"author":260,"featured_media":8818,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[192,195],"tags":[74,165],"class_list":["post-6923","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-featured","category-visual-basic","tag-ide","tag-vb2005"],"acf":[],"blog_post_summary":"<p>&nbsp; by Bill Horst &nbsp; Edit and Continue is a new VB debugging feature which allows the user to make edits to code while the debugger is in &#8220;Break Mode&#8221; 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 [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/posts\/6923","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/users\/260"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/comments?post=6923"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/posts\/6923\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/media\/8818"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/media?parent=6923"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/categories?post=6923"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/tags?post=6923"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}