Thread: Edit and continue feature

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    1,579

    Edit and continue feature

    Hello everyone,


    Mentioned in the book -- "CLR via C#", page 15, chapter 1 "The CLR's Execution Model",

    --------------------
    the C# compiler will emit NOP (no-operation) instructions into the code. The NOP instructions are emitted to enable edit-and-continue feature while debugging.
    --------------------

    What means "edit-and-continue" feature? Why emitting NOP instructions will facilitate this feature?


    thanks in advance,
    George

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    What means "edit-and-continue" feature
    When you debugging application and step on some line of code like

    if(x == 1)

    and you see that this line should be

    if(x != 1)

    you change this line, stop debugging, compile the code from stratch and run the Application in the debug mode again.

    edit-and-continue feature gives the possibility just to edit theline and continue debugging - it replaces several instructions that are modified due to your fix and continue debugging using the new code

    Because the new code could be a little longer thatn the old one - a few NOP instruction could be useful
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  3. #3
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Thanks vart,


    1.

    I used this feature before and I do not know it is called "edit and continue". :-)

    I can understand your below points that new code could be longer than old one, but why adding a new NOP instruction (I think you mean a place holder?) will make things convenient?

    2.

    User may add as much as possible the instructions, I am wondering how many NOP instructions will compiler generate in advance? :-)

    Quote Originally Posted by vart View Post

    Because the new code could be a little longer thatn the old one - a few NOP instruction could be useful

    regards,
    George

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. edit and continue VC++ Net 2003 Standard.
    By Bajanine in forum Windows Programming
    Replies: 5
    Last Post: 08-11-2004, 03:07 PM