Preheat oven to 375°F.
Cook macaroni according to package directions; drain and set aside.
Melt butter over medium heat.Sauté the onion until softened and lightly browned.
Stir in flour and cook, stirring constantly, until the mixture begins to bubble. Gradually whisk in milk, salt, and pepper.
Bring to a boil, stirring constantly, and cook for 1 minute. Remove from heat and gradually stir in the cheddar cheese until melted and smooth.
Stir in the cooked macaroni until well coated. Spoon the mixture into a greased casserole dish.
Combine bread crumbs with Parmesan cheese and sprinkle evenly over the top.
Bake uncovered for 30 minutes, or until bubbly and lightly golden.