One of my most favorite special variables in OpenSCAD is $preview
This variable is True on preview (F5) and False on Render (F6). It allows you to work on complex assemblies without having to comment everything out just to render a single part for export!
$preview can also be combined with $fn to automatically increase fragment count for export


