Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Debugging browser games

A topic by gooby-goofer created Apr 25, 2023 Views: 198 Replies: 1
Viewing posts 1 to 3
(1 edit)

First time here, got my browser game up and running (html, js, canvas) but I can't make sure certain things in the game are working without actually playing the game! No really, I need to be able to make sure certain feature of the game are working but I have to add/change things manually in the console (put player in an area that requires time/items to access, etc) and after an hour of poking and prodding the console, I am here humbly asking for your help. 

just to elaborate, when testing on my local machine I'll pull up the game in browser, put tests in the console like >>> player.inventory.addItem("sword") or something so I can test features of the sword without actually having to gather the resources, craft it, etc. Is this not possible when it's hosted on itch or am I just showing how green I am to web/game dev? 

it's not *absolutely* necessary that I be able to test on the client end (can obviously run on local machine, and have it on github which doesn't have the problem I'm experiencing), but it would be awesome if somebody could tell me how to access the game's functions and variables from the console 

tl,dr: debug and test game through console, how do that on game running on itch?

Moderator moved this topic to General Development

I think you would have to get to the actual game page itself to do that, because it's in an iframe.
But you would also need to be sure that finding and getting the sword works as it should,
it is hard to escape having to simply play out and re play out the whole game, it is a normal part of development.