Why can't I compile code in the editor when it will compile in VS?

You are only able to change specific values and re-compile in the code I believe. Certain things like swapping function arguments and certain variables will mean that you have to close the editor and compile in VS, before re-opening the editor.