Skip to main content

Local Development

Once you have your game created, you can start to develop and debug.

Open Your Game in a Browser

  1. Make sure you are logged into Developer Console.
  2. Go to the detail page of the game you'd like to debug against.
  3. Open the Debug URL
  4. You'll be navigated to the game. And it will start the game session as a mock user. The user's data and state will not persist after closing the game.

Point to a Locally Hosted Version

  1. Open the game in desktop browser first by following the instructions written above.
  2. Start your game local hosting, e.g. your game is hosted at https://localhost:8080/
  3. Find the game's Debug URL, append &game_url=https://localhost:8080/ to it, and navigate.
  4. Now you can find the local game running in the browser and you can debug against it.

Same steps can be also applied to mobile browsers. Please note some features relying on Link app (e.g. Messaging, In-App Purchase, Ads) will not work in this case and throw CLIENT_UNSUPPORTED_OPERATION errors. In order to test those features, please upload, deploy and test directly in Link app.

Using https on localhost

Please note when you host https://localhost with a self signed certificate. By the browser's setting, the certificate may be recognized as an invalid one. This will stop loading any resource from https://localhost, resulting in loading screen stuck at 0%.

In that case, please double check if there's a security alert in the address bar, and make sure the self signed certificate is trusted. If you happen to be using Chrome, please consider enabling chrome://flags/#allow-insecure-localhost.

Debug features

There're some handy features we have implemeneted in the debug mode, to enable developers to test some edge cases before testing on a native app.

Dummy users

By default, you'll start the game as the number 0 dummy user, and in the contact list you can find the other dummy user from 1 to 8.

User 0 to 5 are already playing this game, while 6 to 8 are non-playing users (who don't have a player ID).

Ability to override the user identity

You can append ?override_uid=0 parameter to the URL (available from 0 to 5) to start the game as a specific user. All these users share the same contact list, so you can send message between them to create contexts.

Message preview

When calling API that triggers sending a message, such as LinkGame.context.chooseAsync(), LinkGame.updateAsync() and LinkGame.shareAsync(), a preview modal will show you how the message looks like, and a link to simulate the situation when the message is opened.

Developer can combine this link with ?override_uid= parameter to simulate the situation when the link is opened by either the sender or the receiver.


It's a known issue that the image in the message doesn't show as the same dimension in native app. A bugfix will address this issue soon.


It's a known issue that the update message doesn't show a link in the preview. A bugfix will address this issue soon.

Mocked Ad

To simulate error conditions in Link while loading an Ad, it will randomly throw one of three errors which might happen in Link at the third time calling API that triggers loading an Ad ( Interstitial Ad or rewarded video) , such as adInstance.loadAsync().

Error CodeError Message
INVALID_PARAMPlease check if all parameters are valid.
NETWORK_FAILUREUnstable internet connection. Please try again later.
INVALID_OPERATIONThe requested API is called in a prohibited manner. Please check the documentation for more details.

When calling API that triggers showing a loaded Ad ( Interstitial Ad or rewarded video) , such as adInstance.showAsync(), a mocked Ad modal will show you how the Ad behaves.