none
Changes are not allowed while code is running.

    Question

  • I have an VB.net application upgraded to VS 2015 Professional update 2 from earlier version of Visual Studio.

    When I start debug two of the winforms I receive a message box with the text:

                    Changes are not allowed while code is running. 

    [OK]

    I can set breakpoints in the sources of these forms and change the code like normal.

    Why do I get this message?

    How can I get fix the problem?

    Monday, May 02, 2016 6:02 PM

Answers

All replies

  •  What does your application do?  Is there any chance that it is using any code that may send keys to another window or maybe access any other windows in any way?  Are you pressing any keys while the app is being ran/debugged?

    If you say it can`t be done then i`ll try it

    Monday, May 02, 2016 6:26 PM
  • Are you actually trying to make a change or does this message box appear when the code is executing (not at a breakpoint)?

    Paul ~~~~ Microsoft MVP (Visual Basic)

    Monday, May 02, 2016 6:34 PM
  • I don't know what the older version of VS you used was. I read somewhere that somebody complained because their older version of VS allowed code changes in the IDE code window while the debugger was running. I don't know if that is true or not.

    In newer VS when the debugger is running code changes can not be made in the IDE code windows. The debugger must be stopped, the code changes made, and the code compiled by either running the solution in debugger or manually selecting the option to build or rebuild the project.

    Apparently you can alter the value of a variable while debugger is running which is something I've never done.

    Although you don't mention anything about changing the code and getting the message. You say the message pops up as soon as you launch the app in debugger. Maybe try building the app(s) prior to launching debugger.


    La vida loca

    Monday, May 02, 2016 6:41 PM
  • Hello,

    What do your setting look like e.g IDE menu Tools -> Options


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Monday, May 02, 2016 7:48 PM
  • Hi

    Avatar of Kareninstructor                       

    ,

    Sorry for not replaying sooner.  I haven’t seen any e-mail with replay.

    The problem was not so critical. 

    I made the changes you suggested.  It solves my problem.

    Many thanks.

    Tuesday, May 24, 2016 1:26 PM
  • Hi

    Avatar of Kareninstructor                       

    ,

    Sorry for not replaying sooner.  I haven’t seen any e-mail with replay.

    The problem was not so critical. 

    I made the changes you suggested.  It solves my problem.

    Many thanks.


    Good to hear this :-)

    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Tuesday, May 24, 2016 1:42 PM