How can I set a breakpoint in referenced code in Visual Studio?

后端 未结 7 1964
闹比i
闹比i 2020-12-24 05:12

My main solution is using code from a utility class library, that I wrote myself, but is a part from another solution. How can I set a breakpoint in the referenced DLL file?

7条回答
  •  北海茫月
    2020-12-24 05:32

    follow these steps:

    1. Go to Debug
    2. Go to New Breakpoint
    3. Click on Function Breakpoint or simple press the Ctrl+K, B
    4. a window shows up, type the function name in the following format:

    namespace.ClassName.FunctionName

    For example, assume that you have a code like this and I want to put a breakpoint at the beginning of function D:

    namespace A.B{
        public class C{
              public void D(){
                   int x= 10;
              }
        }
    }
    

    So in Function Breakpoint window you need to type: A.B.C.D

提交回复
热议问题