We were playing a game, and I had cast Detect Magic to more easily find which coffins to loot. Within the 10 minutes, our party was attacked by an Invisible Stalker. I used my action to try to see the invisible attacker, and the DM allowed him to be shown by an outline. I could yell out to my party to attack him and follow him wherever he ran.
The description of the Detect Magic spell (PHB 231) says:
For the duration, you sense the presence of magic within 30 feet of you. If you sense magic in this way, you can use your action to see a faint aura around any visible creature or object in the area that bears magic, and you learn its school of magic, if any.
The description of the Invisible Stalker (MM 192) says:
When it is defeated or the magic that binds it expires [...]
And also:
[...] the magic that created the invisible stalker ends and the elemental is released.
This implies that the stalker is actively bound by magic. I think this was a good call on his part because of the nature of the Invisible Stalker.
If an invisible creature, other than the Invisible Stalker, was considered, would Detect Magic still show an outline around it?