How do you test server side scripts as well as new game modes?

I’m still a bit confused as to how someone would be able to test server side scripts or game modes without going through the full scrds installation and running a homemade-sketch server from their own computer? I’m aware that you could always rent a cheap one but I’m looking to test out code and game modes without having to pay a cent with regards to hosting. I’m a bit confused on how to go about doing this.

And just another question I have, what workspace do you prefer when it comes to developing for gmod? Vps? Home scrds server? A host like NFOservers? Hosting a multiplayer server from the gmod main menu? Let me know what you guys prefer, it doesn’t matter, I just want some insight as to what other developers do.

Simply using garry’s mod. You can make your own gamemode and then run it through garrysmod. You’ll be able to test serverside (blue) and clientside (orange) scripts.

I’m also a bit confused about where certain files go in what folders in order to make them work correctly, I’ll edit this post in a minute when I get off my phone and onto my computer to explain what I’m talking about.

When developing a gamemode (a multiplayer one), always create it on anything other than a listen server (a server from your client) as there’s differences on restrictions, how things are ran and other things. What’s wrong with installing a local srcds? It’s not even that hard! If takes too long to download, just download overnight or when you’re out.

Personally, I have a local srcds server just for auto refresh and when I wanna test things out, I have a dev server on my VPS. That way others can help test my stuff out without me portforwarding etc.

[editline]10th February 2016[/editline]

To reply to above:

lua/autorun = shared (ran on server and client)
lua/autorun/server = server stuff
lua/autorun/client = client stuff

Everything in those folders should run automatically (after they’re mounted of course)

Thanks for the help Exploderguy, another question I have is where would the lua/autonrun/etc. folder be placed in regards to using a listening server to test a gamemode? And what about for a scrds? Right now I’m imagining the folder structure looking like this: gamemode/mine/gamemode/lua, entities folder, etc /autorun etc. or would it be gamemode/mine/gamemode, lua, entities folder, etc /autorun etc

OR would it be gamemode/mine/gamemode, entities folder, etc. /lua /autorun etc

I have one more question which is a little bit off-topic but anyone can answer.

Does anyone have experience with a free VPS provider and using it for a scrds server? Such as those providers where you make 50 posts a month and you get a free vps, etc.

Here’s a very great addon for beginners, as it has the whole directory structure for anything you might make (pick the gamemode 13 one)

I probably should have said this above, but the gamemode directory structure is a bit different;

gamemode/init.lua = server stuff
gamemode/cl_init.lua = client stuff
gamemode/shared.lua = shared stuff

If it’s going to be a big gamemode you should look into the include() function.

I have always developed my gamemodes on my own clients listen server and have not once run into any of those restrictions and differences. I know they exists theoretically, but I never encountered them practically. I have however encountered different behaviors if I run it in single player, so I always put it to 2 players with local server enabled.