Yes, it is kind of a hidden feature isn’t it?
This is how you enable it.
- In bottom left side panel of VS Code you click on the Manage button (cog wheel), and then click Settings.
- When the search box appears, type apigee.
- You should see Cloudcode > Apigee: Docker Options. Click the Edit in settings.json
- A JSON object will be displayed. You will add the following property to this JSON object
“cloudcode.beta.enableApigeeTrace”: true
{ "cloudcode.duetAI.project": "yourorg", "workbench.editorAssociations": { "*.html": "default" }, "editor.codeActionsOnSave": { }, "cloudcode.apigee.gemini.enable":true, "cloudcode.updateChannel": "trusted-testers", "cloudcode.project": "yourorg", "cloudcode.apigee.emulators": [ "1.12.0", "google/apigee-emulator:1.9.1", "gcr.io/apigee-release/hybrid/apigee-emulator:1.12.0" ], "cloudcode.apigee.dockerOptions": { "environmentVariables": { "XTERM": "xterm-256color" }, "dns": "8.8.8.8", "detached": true, "privileged": true, "labels": {}, "volumes": {}, "additionalArguments": "" } }
So your edited JSON file will look like the one below. I added it as the last line below. Make sure to add a comma to the line above.
{ "cloudcode.duetAI.project": "yourorg", "workbench.editorAssociations": { "*.html": "default" }, "editor.codeActionsOnSave": { }, "cloudcode.apigee.gemini.enable":true, "cloudcode.updateChannel": "trusted-testers", "cloudcode.project": "yourorg", "cloudcode.apigee.emulators": [ "1.12.0", "google/apigee-emulator:1.9.1", "gcr.io/apigee-release/hybrid/apigee-emulator:1.12.0" ], "cloudcode.apigee.dockerOptions": { "environmentVariables": { "XTERM": "xterm-256color" }, "dns": "8.8.8.8", "detached": true, "privileged": true, "labels": {}, "volumes": {}, "additionalArguments": "" }, "cloudcode.beta.enableApigeeTrace": true }
- Save the edited file and once you save it you will see the debug button next to the deployed proxy. Notice the Debug Play button next to my localemulator-reverse-proxy.
- Click that Play button, send a request to your local proxy, and then you should see the following Trace Tab open. You can click on each line in the Stages section and the Stage details section will display the details.
Happy local debugging! What a joy!