I am wondering how to include debug code inside the XNA? Like console.writeline
Enable the console.
In Visual Studio right-click your project in Solution Explorer. Then click on "Properties" and in the "Application" tab select "Console Application" as your Output-Type.
Don't forget to change it back to "Windows Application" in order to disable the console when you are done debugging.