Doubt about way ionic/cordova engine works

Does ionic/cordova engine recompile everything after we build or it uses previous data? I am finding debugging too difficult.Once i get error, no matter what i do, it continues to show error.So instead i copy code to new blank project, it runs fine.
What’s the reason for this?