On the .Net Security Bolg Shawn Farkas blogs about doing debugging clickonce application, he talks about the gflags tool.
Debugging a Partial Trust ClickOnce Application
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.