Sure you can - that's the beauty of Java 🙂
Just make sure that your Alfresco starts with the required parameters to run in debug mode - e.g. something like
"-agentlib:jdwp=transport=dt_socket,server=y,address=8555,suspend=y"
where 8555 is some arbitrary port.
Then set up your Eclipse with the required sources, create a debug configuration to attach to your server and hit the go button 🙂
Cheers
Gyro