A father and son were attacked by masked men armed with a knife and hockey stick as part of a dispute over an alleged £500 drug debt, a court has heard.