How do I enable the snapshot debugger (as well as other features) through powershell or an ARM template deployment?
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@Japeth Thank you for your feedback . We will investigate and update this thread.
For an azure app service, you can set app settings in an ARM template to enable snapshot debugger and profiler like this. You add a config resource that contains the app settings as a child resource of the website:
`
// website resource
{
"apiVersion": "2015-08-01",
"name": "[parameters('webSiteName')]",
"type": "Microsoft.Web/sites",
"location": "[resourceGroup().location]",
"dependsOn": [
"[variables('hostingPlanName')]"
],
"tags": {
"[concat('hidden-related:', resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName')))]": "empty",
"displayName": "Website"
},
"properties": {
"name": "[parameters('webSiteName')]",
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName'))]"
},
"resources": [
{
"apiVersion": "2015-08-01",
"name": "appsettings",
"type": "config",
"dependsOn": [
"[parameters('webSiteName')]",
"[concat('AppInsights', parameters('webSiteName'))]"
],
"properties": {
"APPINSIGHTS_INSTRUMENTATIONKEY": "[reference(resourceId('Microsoft.Insights/components', concat('AppInsights', parameters('webSiteName'))), '2014-04-01').InstrumentationKey]",
"APPINSIGHTS_PROFILERFEATURE_VERSION": "1.0.0",
"APPINSIGHTS_SNAPSHOTFEATURE_VERSION": "1.0.0",
"DiagnosticServices_EXTENSION_VERSION": "~3",
"ApplicationInsightsAgent_EXTENSION_VERSION": "~2"
}
}
]
},
`
@Japeth Thank you again for your question! We are going to close this thread as resolved but if there are any further questions regarding the documentation, please tag me in your reply and we will be happy to continue the conversation.
@kobulloc-MSFT
How do we enable snapshot debugger BUT turn OFF "Show local variables for your application when an exception is thrown." via ARM?
Concern is over PHI data being shown.
In order to see local variables in snapshots, you need to enable the Instrumentation Engine. That is enabled with the InstrumentationEngine_EXTENSION_VERSION variable. If you don't set that variable, you won't see local variable values in the snapshot.