When attempt is made to display resource-type variable in the debugger the following notice happens and nothing is displayed to the user:
Handle resource-type variables by casting them to string. The Var Dumper Symfony's component is doing more then that (see https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/VarDumper/Caster/ResourceCaster.php), but we're not using it yet. The [composer] Use Symfony's VarDumper for Template Parser debugging discussion is about that.
After the fix resource is displayed in debugger like this: