It is just the action of displaying the Preferences panel with the Behaviour tab selected on an external monitor that triggers the crash.
1 - Open XCode on the laptop monitor.
2 - Open Preferences
3 - Select the Behaviour Tab
4 - Drag the Preference panel over to the external monitor.
5 - XCode --> Splat!
By the way, the next time you will open the Preference panel, the Behaviour tab will be displayed and XCode will crash if you have it displayed in your external monitor. So make sure to open XCode on your laptop monitor and select any other tab in the preference panel.