I have a custom feature that, when activated, alters a document library (adds content types, sets up views, attaches a workflow). For some reason, the first time I activate the feature nothing seems to happen. The page refreshes but the feature still shows as deactivated.
When I look at the document library I can see some of the changes have been made, but not all. When I activate the feature a second time the page correctly refreshes and shows the feature to be active - verified by looking at the document library which contains all changes.
There's nothing I can see in the ULS logs to tell me what happens the first time I try to activate, I've got no idea how I can debug this issue as attaching to the process and stepping through the code isn't an option.
Any ideas?