Heat large pot or sauté pan over med heat.
Saute onions till just tender.
Add in garlic.
While onions are cooking, break tomatoes (do NOT drain) apart using your hands or a potato masher.
Add smashed tomatoes, salt, & pepper. Bring to a low boil over med heat.
Reduce heat to low, add sugar, basil, and chili flakes.
Cook on low (uncovered) for approx 45 minutes.
Cook 1 # spaghetti pasta according to package directions.