Half Life 2 Cheats and Console Commands List
All you need to do is just check the “Enable Developer Console” button and press the ~ tilde key. Your console will come up and the game will be paused.
If tilde ~ key is not working to open the console, you need to change the key-binding, for the console with the options available on keyboard in settings.