Hotloading Your Plugin
Hot-what now?
Skyrim has functionality to "hotload" a plugin -- that is, to reload the plugin while the game is still running, instead of having to close and re-open the game.
You can use this during development to save time.
How do I do it?
Force-close files in-game using the console command fcf.
Save your plugin if you haven't already. In Oldrim, it was necessary to force-close files before saving changes, but that should no longer be the case.
Hot-load the plugin with the console command hlp mypluginfilename to make the game reload the plugin without quitting.
Use the full ESP filename, but without the .esp file extension.
If you've changed scripts, use the console command reloadscript myscriptname to reload it.
What's the catch?
It's not perfect:
There's a risk of crashing to desktop.
Some cells will re-lock the plugin files on load, and you'll have to fcf again.
Any quests that were running and got modified will be stopped.
New saves can be unstable.