I need to only run ship build and I need to assert on certain condition in release build to see if the problem is fixed. How do I do it?
Undefine the NDEBUG macro - you can do this locally around the asserts you want to remain in the build:
#undef NDEBUG
#include <assert.h> // reinclude the header to update the definition of assert()
or do whatever you need to do so your build process does not define the NDEBUG macro in the first place.