Edit and continue feature

This is a discussion on Edit and continue feature within the C# Programming forums, part of the General Programming Boards category; Hello everyone, Mentioned in the book -- "CLR via C#", page 15, chapter 1 "The CLR's Execution Model", -------------------- the ...

  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
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,424
    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
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21