19-year-old Seosamh Deehan of Gweebara Park and 19-year-old James Rush of Glen Road both in Derry were jointly charged with attempted robbery of the Northland Stores on October 10.
They were also charged with possessing an offensive weapon namely a knife and conspiracy to rob also on the same date.
A police officer told the court that around 8.45 on Friday night a man, allegedly Deehan, masked with a balaclava and carrying a knife entered the Northland Stores and demanded money.
He said that almost immediately he was tackled by members of the public and bright to the ground.
Rush was said to be nearby and got into a taxi and asked the driver to slow down passing the shop before driving away.
At interview Deehan told police he had a drugs debt and was forced under duress to carry out the robbery. Rush said that Deehan had told him what he planned to do.
The officer opposed bail on the grounds that both men were well known in the Rosemount area and that they could interfere with witnesses.
Both men were released on their own bail of £750.
Both men were ordered to wear tags, observe a curfew and not have contact with each other.
The case will be heard again on November 10.