Detect if you’re in the “Frontend Editor” mode in Visual Composer WordPress [closed]

So, I’ve dig in the core of WPBakery Visual Composer and came up with this solution:

function is_vc_build() {
    return function_exists( 'vc_is_inline' ) && vc_is_inline() ? true : false;
}

Hope it will help somebody in future as I spent lots of time on this.