Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
196 views
in Technique[技术] by (71.8m points)

c# - Start Debugger in Code

I need to debug an application that is started from a one-click install. (VS 2010, Excel VSTO with Office 7). Based on login credentials supplied to the one-click installer application, the user should see one of two splash pages. This all works fine on my machine, but when deployed, changing from the default to the second splash page results in an error.

For the life of me, I can't figure out how to debug the process from within VS2010. I can attach to the login before entering the credentials, but I can't attach to Excel because it isn't launched until I click the OK button.

So, is there some way to have Excel, or rather, my code call the debugger as it is instantiated so I can figure out why my image resource isn't available in the deployed application?

Thanks.

Randy

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
System.Diagnostics.Debugger.Launch();

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...