Programming in C# — Question 101
You have a C# application named App1 that invokes a method in an external assembly named Assembly1. Assembly1 is written in C++ and is natively compile by using a debug build.
When you debug App1, you do not see any debug information for Assembly1.
You need to ensure that when you debug App1, you see the debug information for Assembly1.
What should you do?
Answer options
- A. On the Debugging page of the configuration properties for the C++ project, set the Debugger Type to Native Only.
- B. On the Debugging page of the configuration properties for the C++ project, set the Debugger Type to Mixed.
- C. On the Debug page of the project properties for App1, click Enable native code debugging.
- D. In the project properties for App1, set the working directory to the same directory as Assembly1.
Correct answer: B
Explanation
The correct answer is B because setting the Debugger Type to Mixed allows the debugger to handle both managed and native code, enabling you to see the debug information for Assembly1. Option A only allows for native debugging, which would not include managed code like that in App1. Option C enables native code debugging but does not address the debugger type settings required to see both types of debug information. Option D does not affect the visibility of debug information.