question

wintah avatar image
wintah asked

How to display photon webhook information in Playstream Debugger?

Hi,

Just started experimenting with PlayFab.

I'm probably stupid, but since I spent hours thinking that my automatic photon webhooks weren't being launched at all in Cloud Script, I'm curious on how to show information on debugger for example on room creation, when some requirements are fulfilled (or even at all).

I kept thinking that there was something wrong with my login, but finally realized that I could test that the hook was working by creating a property for a player and then changing the value in the room created script. This worked, so I'm relieved (yet annoyed for not testing this earlier).

The room created is an example, but in the future some custom events through the webhooks might be nice to follow on the debugger. I originally thought that the log.debug instructions would be shown, but apparently not, and couldn't figure out a way to display data on those events on the debugger.

Reading the above, perhaps my questions should be: What is the best way to debug the photon webhooks? And is there a way to see when a webhook has been executed by a player? (or how to say to the debugger in the cloudscript: show this webhook call in the debugger)

Thanks!

CloudScriptphoton
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

The simplest thing for debugging would be to return error info in the Message of the response, since you should get that back on the client (in response to the Photon call that caused the Cloud Script to be run). You can read more about that in the Return Values->Best Practices section of the Photon Webhook documentation on the Exit Games site: https://doc.photonengine.com/en/realtime/current/reference/webhooks.

For information in PlayStream on what handlers were run for players (and their results), you could generate a player event using WritePlayerEvent.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

wintah avatar image wintah commented ·

Thank you for the quick reply. I did some experimenting previously on plain Photon a few weeks ago, and using the return values is quite fine. Just mistakenly thouht that the webhook calls would be visible in Playfab.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.