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
221 views
in Technique[技术] by (71.8m points)

c# - Attach debugger onto another Visual Studio instance

I'm doing some visual studio extension development in Visual Studio 2010. It would be useful to debug while developing so I have it configured to open another instance of VS when debugger for F5 ( http://donovanbrown.com/post/How-to-debug-a-Visual-Studio-Extension.aspx). This all works fine but is there a way to attach a debugger to an existing instance of VS2010, I have tried and the breakpoints aren't being hit. There are no errors but wondering if there is a way?

I should add I do know how to attach to a debugger and I have used it before to attach to ASP.net code.

See Question&Answers more detail:os

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

1 Reply

0 votes
by (71.8m points)

Under Debug there is a item called Attach to Process. This will do exactly what you want it to do. enter image description here

Use the Title column to tell which instance of devenv.exe you want to connect to (notice that I started the attach on BinaryFileSearch, but I am attaching to FixClientNoteRTF). enter image description here

It does not let you attach to yourself because if you hit a breakepoint the UI would stop responding and how would you tell it to step or continue?


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

...