'Google Cloud functions Java 11 - How to Debug locally ? Avoid the need of re deploy with logs

I am using intellij IDE and maven project.

To debug cloud function, every time I need to Re-deploy with SYSO logs and taking 2 mins to upload.

Do we have any mechanism run JAVA GCP cloud functions locally so we can fast development and debug process ?



Solution 1:[1]

You can run locally your function thank to the Function Framework and Maven

mvn function:run

This create a local webserver that listen on the port 8080. Curl it to test it

curl localhost:8080

curl -X POST -d "my data" localhost:8080

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 guillaume blaquiere