Limited support
This feature is only present in Portal 2: Community Edition and Portal: Revolution.

ai_debug_los

🟩 Executable on Server

ai_debug_los <value>

NPC Line-Of-Sight debug mode. If 1, solid entities that block NPC LOC will be highlighted with white bounding boxes. If 2, it'll show non-solid entities that would do it if they were solid.

Warning:

This is a cheat command and can only be used when sv_cheats is set to 1.