cheats are the same as in the first part
Portal 2: Cheat Codes Free Download
Press the tilde (~) key and enter (if the console is not called, enable it like this: settings -> keyboard / mouse ->
Debug console -> enable):
sv_cheats 1 – enable cheats mode
god – immortality
noclip – fly / walk through walls
host_timescale [1-standard] – the more, the faster the game. You can enter [0.5] – the game is twice as slow.
upgrade_portalgun – upgrade a gun
ent_create_portal_weight_box – create a cube
ent_create_portal_metal_sphere – create a metal ball
fire_energy_ball – Launches an energy ball
Sv_portal_placement_never_fail 1 – allows you to create practically any portals at any level
bind KEY CODE – Bind a code to a key. For example: bind g noclip
change_portalgun_linkage_id # (0, 1, 2, 3, 4, 5 … +) – Change the portal gun ID (you can create new portals, the old ones remain hanging ..)