I have a samsung i9100 phone. The screen is broken. Usb debug mode is not enabled. So is it possible to enable usb debug in such situation? I don't want to replace the screen now.
You need to be rooted and have ROM with sqlite3 support e.g., Cyanogemod. If yes, you can try updating the settings files manually via entering adb shell:
su sqlite3 /data/data/com.android.providers.settings/databases/settings.db update global set value='1' where name='adb_enabled'; update global set value='1' where name='development_settings_enabled'; exit reboot
caveat: if you're rooted but have never invoked su via adb, then the system will ask for granting permissions to adb client which of course is displayed on screen and, depending on your superuser app defaults, will be automatically granted or rejected since the screen is broken.
An existing XDA thread suggests a manual push/pull method here.