Shiyu
Shiyu

Reputation: 87

How to debug native C++ calling from asp.net using Visual Studio 2017

I have an asp.net web application (.NET Framework) by Visual C#, and this web application uses native C++ DLL by DllImport. The native C++ DLL project is also part of the solution. However when I do the debugging, and try to step into the native C++ code, it fails, the breakpoint on the C++ code shows "the breakpoint will not currently be hit no symbols have been loaded".

Upvotes: 3

Views: 486

Answers (1)

Shiyu
Shiyu

Reputation: 87

The solution is : make sure The "Native Code" check box (Project>Property>Web>Debugger>native code) as shown on the picture is checked. By default it is unchecked when the .net project is created.

I spent whole morning to find out cause, and it is not mentioned in stackoverflow and other website, therefore would like to share the solution.

enter image description here

//Follow Jack's suggestion to post the solution as an answer, instead of putting it as part of the question. Thanks Jack.

Upvotes: 1

Related Questions