'Key to the City' in Orzammar, I presume here. You run around everywhere and look at little notes lying around on the floor in various places. Lots of them, actually. One I can think of right now is right on top of/behind the entrance just as you get into the Diamond Quarter. If you're playing on PC, hold down tab a lot and make sure to visit every single room in the city.
Debug mode requires an addition to the shortcut on your desktop. Right click, properties and it should say;
"C:\Program Files\Dragon Age\bin_ship\daorigins.exe" -enabledeveloperconsole
Exactly like that. Then in the game, press that weird little button under the escape button, the §. No menu will appear, just press it once and start typing.