question

tomgeorgin avatar image
tomgeorgin asked

How do I debug Cloudscript? Or how do I know what went wrong?

Hello,

I am running a Cloudscript when a CustomEvent is sent to my title, and when I go into the Playstream Monitor, I can see that the function I tried calling FAILED.

However, and maybe I missed something simple, I cannot, for the life of me, figure out where to have any additional information on what went wrong. Can't break into the script, can't find a log anywhere, it's an automatic execution from a rule, so no response in my game code...

Can anyone help me out please? Thank you

Tom

CloudScript
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

·
Sarah Zhang avatar image
Sarah Zhang answered

Did you try to execute CloudScript via client API ExecuteCloudScript manually before you applied CloudScript function to a rule? If you have tried, do you mean you can’t find some methods to check error details like error stack trace? If you call ExecuteCloudScript via SDK, for example, Unity SDK, you can use error.GenerateErrorReport(); to get Error details, so you can log them in the console. You can also test PlayFab API via external Restful API testing tools, like Postman, if so It would be convenient for you to check Error details in the response. For more details of SDK, please click here.

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.

tomgeorgin avatar image tomgeorgin commented ·

I am not used to web developpment at all, I am working with Unreal and C++. I find this quite crazy to not even have a log inside PlayFab Manager when we can write CloudScript in their...

I'd also try to avoid calling CloudScript directly from game, it's forcing the user to recompile his entire project (Unreal) everything you want to test a new problem with the Javascript contained without the CloudScript, that also sounds crazy.

And plugging any of this into a Restful API seems like a crazy amount of work for something that is so essential and time consuming if you want to do just a few small things in there.

Thank you for your answer, it answers the given question, so I accepted it as answer, as for me personally, I opted for another option than CloudScript!

1 Like 1 ·

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.