-
-
Notifications
You must be signed in to change notification settings - Fork 504
Debugging
Tim Hall edited this page Mar 17, 2014
·
3 revisions
Debugging Excel-REST can be difficult due to the complexity of the library, but I have found the following tips helpful for setting breakpoints to get an idea of what's occurring under the surface:
(Note: line numbers may change as the library changes)
- Execute:
RestHelpers.ExecuteRequest:461 - ExecuteAsync:
RestHelpers.ExecuteRequestAsync:495 - Callback:
RestRequest.ReadyStateChangeHandler:370 - Timeout, sync:
RestHelpers.ExecuteRequest:473 - Timeout, async:
RestHelpers.TimeoutTimerExpired:689+RestRequest.TimedOut:408
- Request.Url, without Authenticator:
RestClient.HttpSetup:132+RestRequest.FormattedResource:104 - Request.Body, sync:
RestHelpers.ExecuteRequest:466+RestRequest.Body:141 - Request.Body, async:
RestHelpers.ExecuteRequestAsync:503+RestRequest.Body:141 - Request.Headers:
RestHelpers.SetHeaders:422 - Request.Cookies:
RestHelpers.SetHeaders:427 - Request.Proxy:
RestHelpers.PrepareProxyForHttpRequest:441
- Response.Data:
RestHelpers.CreateResponseFromHttp:531 - Response.Headers:
RestHelpers.ExtractHeadersFromResponseHeaders:599 - Response.Cookies:
RestHelpers.ExtractCookiesFromHeaders:564
- Determining what's stored in Headers, Parameters, Segments, Cookies, Body, and other dictionaries: Set breakpoint at issue, open Immediate Window (Ctrl + g), and use the following:
? RestHelpers.ConvertToJSON(...Dictionary...)(?is short forDebug.Print). For example to view theHeaderssaved forYourRequest, use:? RestHelpers.ConvertToJSON(YourRequest.Headers)