Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Debug.msTraceAsyncCallbackStarting Function

Associates the callback stack with a previously specified asynchronous operation.



Required. The ID associated with the asynchronous operation.

Call this function in the callback function for the asynchronous operation after the call to Debug.msTraceAsyncOperationCompleted.

Note Note

Some debugging tools do not display the information sent to the debugger.

asyncOperationId must correspond to the operation name previously returned from Debug.msTraceAsyncOperationStarting.

The following code provides an example of tracing an asynchronous call for a Windows 8.x Store app.

function asyncWrapperFunction() {
    var opID = Debug.msTraceAsyncOperationStarting('async trace');
    doSomethingAsync().then(function (result) {
        Debug.msTraceAsyncOperationCompleted(opID, Debug.MS_ASYNC_OP_STATUS_SUCCESS);
        // Process result of async operation.
    }, function (error) {
        Debug.msTraceAsyncOperationCompleted(opID, Debug.MS_ASYNC_OP_STATUS_ERROR);


function doSomethingAsync() {
    return WinJS.Promise.as(true);


Supported in the Internet Explorer 11 standards document mode. Also supported in Store apps (Windows 8.1 and Windows Phone 8.1). See Version Information. Not supported in the following document modes: Quirks, Internet Explorer 6 standards, Internet Explorer 7 standards, Internet Explorer 8 standards, Internet Explorer 9 standards, Internet Explorer 10 standards. Not supported in Windows 8.

© 2015 Microsoft