How to disable debug plugins in release build ?

Hello,
plugins are always included in the build ( even if they are not used ), how can I auto disable some plugins in release mode to make smaller builds ?

( I have some plugins which are only required for debugging )

Thanks.

Unity can differentiate plugins for different platforms, but not for different build modes as far as I know. The closest solution I could find is a suggestion from Dreamora in this forum thread from the time when platform dependent plugins were not implemented, but it should still work for you case:

https://forum.unity.com/threads/exclude-dll-on-specific-platform.113706/