How to Open and Access the Developer Console in Garry’s Mod Game

Garry’s Mod (GMod) is a popular sandbox game that allows players to manipulate objects and experiment with physics. One powerful feature in GMod is the developer console, which gives access to cheat commands, server commands, debugging info, and more. However, the console is disabled by default. Here is a step-by-step guide on how to open and access the developer console in Garry’s Mod:

Enabling the Developer Console

To enable the developer console:

  1. Launch Garry’s Mod
  2. In the main menu, click on Options
  3. Select the Keyboard tab
  4. Click on Advanced at the bottom
  5. Check the box next to Enable Developer Console (~)
  6. Click OK and then Apply to save the changes

Opening the Developer Console

Once enabled, you can open the developer console in-game by pressing the ` key, which is the key below Esc and left to the 1 key on standard keyboards.

On laptops, you may need to press Fn + ` to open the console.

Changing the Console Toggle Keybind

If pressing the ` key does not open the console, you likely have a non-English keyboard layout. In that case, you’ll need to change the console toggle keybind:

  1. Right-click Garry’s Mod in your Steam library
  2. Click Properties
  3. Under General, click Set Launch Options
  4. Type -console (this enables console on launch)
  5. Type +bind followed by your new key for toggling console
  • For example: +bind k toggleconsole
  1. Launch Garry’s Mod

You can now toggle the console by pressing your chosen key.

Using Console Commands

Once the console is open, you can type GMod commands and press Enter to run them. Useful commands include:

  • sv_cheats 1 – Enables cheat commands
  • noclip – Player can fly and clip through walls
  • impulse 101 – Gives all weapons
  • buddha – Player takes damage but health never goes below 1
  • god – Player becomes invincible
  • thirdperson – Toggles third person camera
  • gm_showhelp – Lists all console commands

Basic Scripting in the Console

The GMod console can also be used to run simple Lua scripts:

print("Hello World!") -- Prints a message
local ent = ents.Create("prop_physics") -- Spawns a physics prop
ent:SetModel("models/props_junk/PopCan01a.mdl") -- Sets prop model
ent:SetPos(Vector(0, 0, 72)) -- Sets position
ent:Spawn() -- Spawns the prop

This allows you to test out concepts before making an actual addon.

Important Notes

  • Console commands only work in singleplayer or on servers with sv_cheats 1
  • Scripts can crash your game if they contain errors
  • The console does not open while in multiplayer menus
  • Bind console to a different key if ` does not work
  • Console output can help diagnose mod issues

Accessing the Console on Servers

If you run a GMod server, the console allows server administration from in-game or via RCON tools. Useful commands include:

ulx adduser
ulx removeuser
ulx ban
ulx slap
ulx teleport
sv_password

See the ULib wiki for details on managing users and permissions.

So in summary, enabling and accessing the developer console unlocks many useful features in GMod. It takes just a few steps to set up, and allows cheating, scripting, debugging, and server management. Give it a try and see what interesting things you can do!