This generate a .urdf file but when i try to open it in v-Rep, using [Menu->Plugins->ecc] the software fails.
I tried to find something online but didn't succeed.
Do you have any suggestion or a step by step guide in order to open a .xacro file in V-Rep?
V-REP (or its plugins) cannot translate/understand xacro files, so you will have to process them as you mention it. Not sure what the problem with the generated URDF file is.
Maybe there is a possibility to translate your URDF file into an SDF file, which can also be read via a V-REP plugin.