In Visual Studio, is there any way to make the debugger break whenever a certain file (or class) is entered? Please don’t answer ‘just set a breakpoint at the beginning of every method’ 🙂
I am using C#.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Macros can be your friend. Here is a macro that will add a breakpoint to every method in the current class (put the cursor somewhere in the class before running it).
Edit: Updated to add breakpoint by function name, rather than file/line number. It ‘feels’ better and will be easier to recognise in the breakpoints window.