Samsung A5 2017 - Developper option restart the phone

Hi,

A5 is running on E foundation/Line Age Rom.
If I click on developper option, or while phone is plugged on USB on debog , it restart the device and usually restarting is looping, I got to start downgrad and quickly start on recovery to reboot system to restart it properly.
And sometimes got repeating several times this operation to get the device running back.

Have a good day