Thank you much. At the time I did this, I had the selector set to BOTH for all batteries - not sure if that is better or worse!
So the 'bad' part of starting while connected to shore power is what?? if no battery is selected? What is the issue? just for my knowledge.
Well if you had the battery selector set to "ALL" and if your boat is wired correctly, then you have nothing to worry about. Your engine has a charging system that generates about 14.5 volts DC to charge your batteries. If it does not have batteries connected to it when it runs then the charging system can be damaged.
Likewise, depending upon the type of selector switch you have, moving it while the engine is running could damage the charging system as well. If it is the type of switch that does a "make before break" then its fine to move it, because as you switch, for example, from "1" to "ALL" or whatever it will connect battery 1 before disconnecting ALL/battery 2. NEVER turn the switch off while the engine is running. If you are not sure, set it to ALL before you start and don't move it until after you shut down.
Regarding shore power, this depends entirely on how the boat is wired, but most likely it is not relevant to this issue. If you have an AC battery charger it will charge the batteries when you plug in, and that's fine. I can't speak for every model of charger, but I have not seen a charger damaged by running the engine while it was turned on.
Most likely the AC charger is not sufficient to start the engine if both batteries are dead. Such chargers do exist but most that you install just charge slowly.
If you do have a dead or defective battery you need to switch away from it to start. So if battery 1 is dead, start with battery 2 alone, assuming battery 2 can start the engine. There are house batteries and starting batteries. You may want to check and see which is which, or if they are the same. If you have one of each, start the engine using the starter battery IF you have a make before break switch you can switch to "ALL" while the engine is running. That way, both batteries get charged by the engine.