To reload a Blender Addon at the console type:
Note: under-the-hood Blender uses Python's
imp.reload to reload modules.
One of its caveats is that the module dictionary will not be replaced. Since that is where module globals are stored, this can lead to surprises (if expecting a pristine module state after reload).
As such, restarting Blender semi-frequently is still a good idea even when using console reloading during development.
Note that the
imp.reload behavior can also be used (with care) as a debug-enabling tool; for example, to "persist" a network socket across Addon reloads:
socket_that_survives_reloads = None
if not socket_that_survives_reloads:
print("creating new socket connection")
socket_that_survives_reloads = however_you_connect()
print("re-using existing socket connection")