Microlensing offers a unique opportunity to probe exoplanets that are temperate and beyond the snow line, as small as Jovian satellites, at extragalactic distance, and even free floating exoplanets, regimes where the sensitivity of other methods drops dramatically. This is because microlensing does not depend on the brightness of the planetary host star. The microlensing method thus provides great leverage in studying the exoplanets beyond the snow line, posing tests to the core accretion mechanism, especially on the run-away phase of gas accretion to form giant planets. Here we propose to robustly and routinely measure the masses of exoplanets beyond 1 AU from their host stars with the microlensing method; our experiment relies on directly imaging and resolving the host star (namely the lens) from the background source of the microlensing events, which requires the high spatial resolution delivered by the ELTs. A direct result from this project will be planet occurrence rate beyond the snow line, which will enable us to discern different planet formation mechanisms.