Two hooded men burst into the Edinburgh home of the 23-year-old woman and her toddler son at around 11pm on Friday.
The family dog started barking and the two men fled the scene after taking a small amount of money from the West Pilton Green property, police said.
One of the suspects was brandishing a knife during the raid. The woman and her son were not injured, but they were frightened by the incident.
Police in the capital are now appealing for witnesses to come forward.
The suspects, who both pulled their hooded tops over their faces, are described as being white, of slim build and aged between 16 and 19.
One was wearing a dark blue or black cotton tracksuit. The other was wearing grey cotton track bottoms, and a grey zip-up hooded top with a dark band over the shoulders and three white stripes on the sleeves.
Detective Sergeant Gary Harrison, of Police Scotland, said: “Neither the mother nor her child were injured during this incident but it was very frightening for them and they are shocked.
“We are appealing for information to help trace the two men who were responsible for this.
“Anyone who was in the area of West Pilton Green late last night and saw anyone acting in a suspicious manner or matching the descriptions should contact Police Scotland on 101 or make an anonymous report through Crimestoppers on 0800 555111.”