Debugging apps (Windows)
ProconTEL 4 apps can be ran and debugged outside ProconTEL 4 environment, however, sometimes it is necessary to debug them inside ProconTEL 4 environment as well. This article contains some tips about how to adjust the app configuration in order to debug an app that is running inside ProconTEL 4 environment.
Adjust watchdog timeouts
App proxy periodically pings the app process and if it doesn't get a response for an extended period of time (30 seconds by default), the app enters a faild state. This logic poses a problem when debugging because the app becomes unresponsive when it is held on a breakpoint and it can fail if it stays on it for a long time. However, it is possible to adjust the timeout value so that app proxy waits for longer, here is how to do it:
- Open C:\Program Files\Macrix\ProconTEL 4\app-proxy\appsettings.json.
- Find LivenessTimeoutInSec value.
- Adjust LivenessTimeoutInSec to a longer period (for example, 300 seconds).
- Restart the app.
Additionally, the app process itself also records the last time app proxy pinged it and will enter failed state if the last time it was pinged is longer than the configured timeout (60 seconds by default). ProconTel.SDK has an extension method for configuring this timeout. Here's an example how to adjust the timeout:
var app = builder.Build();
app.ConfigureProxyFailedAppShutdownTimeoutInSec(500);