Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breakpoints not hit from .NET Standard 2.1 DllExport #137

Closed
pmariso opened this issue Feb 12, 2020 · 2 comments
Closed

Breakpoints not hit from .NET Standard 2.1 DllExport #137

pmariso opened this issue Feb 12, 2020 · 2 comments

Comments

@pmariso
Copy link

pmariso commented Feb 12, 2020

I realize this probably isn't a DllExport issue, but maybe others using it have run into it.

Using the latest version of Visual Studio 2019 Preview.

I have a .NET Standard 2.1 class library that exports several native APIs using [DllExport]. If I attach the debugger to the process that loads the DLL and calls the API, break points set in the class library DO NOT hit. I have Native Debugging enabled, and also Use Managed Compatibility Mode. I can confirm the APIs are being called and returning, however, because the native application that uses them is working.

Alternatively, if I build the same class library as a .NET Framework library, and repeat the scenario, the debug breakpoints DO hit.

Is there a problem with Visual Studio debugger transitioning from native to Managed under .Net Core 3.0 / .NET Standard 2.1? Or am I potentially doing something wrong, or have wrong settings?

I've done lots of searches on this topic and haven't found a good answer yet.

@3F
Copy link
Owner

3F commented Feb 12, 2020

Because ilasm on coreclr will not generate .line directives at all:
3F/coreclr#3

I have the plan to review this feature of course (~someday); But my actual modified versions still follows this logic.

Closed as duplicate of #23. Feel free to continue there.

@3F 3F closed this as completed Feb 12, 2020
@3F 3F added the netcore label Feb 12, 2020
@pmariso
Copy link
Author

pmariso commented Feb 12, 2020

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants