President Joe Biden and former President Donald Trump will debate on Thursday, offering a high-profile opportunity to gain an edge in a close race.