question

Maarten Braaksma avatar image
Maarten Braaksma asked

Local Azure debugging ExecuteFunction example

Hey PlayFab!

So at the moment, I would like to debug my Azure Functions within Visual Studio Code. You have provided me with an ExecuteFunction.cs class so I'll be able to use the local implementation of the ExecuteFunction feature.

So do you have an example of the ExecuteFunction method for me, so I understand how I should use this in my unit tests?

Thanks in advance!

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

·
Made Wang avatar image
Made Wang answered

If you have completed the necessary configuration for local debugging by referring to Local debugging for Cloudscript using Azure Functions - PlayFab | Microsoft Docs, then you need to run your Azure Function locally first, and then call ExecuteFunction in your project as usual. Refer to PlayFab CloudScript using Azure Functions Quickstart Guide - PlayFab | Microsoft Docs to understand how the function is written.

3 comments
10 |1200

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

Maarten Braaksma avatar image Maarten Braaksma commented ·

Hey Made,

Thanks for your response. But do you have an example of how I should execute that local implementation of ExecuteFunction?

I can't find an example in the docs about this.

0 Likes 0 ·
Made Wang avatar image Made Wang Maarten Braaksma commented ·

Is it an example about the code? If so, it needs to be clarified that local debugging does not require modifying the code in the Unity project, you just need to complete the environment configuration and then run the project.

There is an example about ExecuteFunction in the above mentioned documentation, you can refer to it.

0 Likes 0 ·
Maarten Braaksma avatar image Maarten Braaksma Made Wang commented ·

Ah, I see it now! I was thinking way too complex about this situation.

I've managed to solve it by authorizing the user and using "PlayFabCloudScriptAPI.ExecuteFunction" within the testing project.

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.