From this Microsoft forum question:
Terminated means that the app was first suspended, and then the user Session ended normally.
To simulate this in the debugger, you can run your app in the simulator and then trigger a suspend (Debug, Trigger Suspend). Then you can log off of the simulator. You can then fire up the simulator again in the debugger and see you hit the condition that you came from a previous state of 'Terminated'.
Alternatively, you can use the tool available At winrt.codeplex.com
[Update: 2013-03-11 @ 11:02PST]
It's important to understand that in the Windows 8 App Lifecycle, the ApplicationExecutionState
enumeration indicates the state of the app last time the process exited (via several objects' PreviousExecutionState
property ).
The only way to simulate this state is to suspend your app, log-off and log back in again and restart the app or you could simulate a system under load by using/writing an app that can consume a considerable portion of the available physical RAM, forcing Windows to try and reclaim resources by force-terminating suspended apps.
To stress your machine out and consume large amounts of memory etc., you could use the consume.exe command-line app that comes in the Windows SDK or use James McCaffrey's EatMem tool.