Fix debug option for extension installer.

related issue: #350, #360