-
-
Notifications
You must be signed in to change notification settings - Fork 505
Debugging
Tim Hall edited this page Mar 16, 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:465 - ExecuteAsync:
RestHelpers.ExecuteRequestAsync:497 - Callback:
RestRequest.ReadyStateChangeHandler:370 - Timeout, sync:
RestHelpers.ExecuteRequest:472 - Timeout, async:
RestHelpers.TimeoutTimerExpired:657+RestRequest.TimedOut:408
- Request.Url, without Authenticator:
RestClient.HttpSetup:132+RestRequest.FormattedResource:104 - Request.Body, sync:
RestHelpers.ExecuteRequest:465+RestRequest.Body:141 - Request.Body, async:
RestHelpers.ExecuteRequestAsync:465+RestRequest.Body:141 - Request.Headers:
RestHelpers.SetHeaders:422 - Request.Cookies:
RestHelpers.SetHeaders:427 - Request.Proxy:
RestHelpers.PrepareProxyForHttpRequest:440
- Response.Data:
RestHelpers.CreateResponseFromHttp:530 - Response.Headers:
RestHelpers.ExtractHeadersFromResponseHeaders:603 - Response.Cookies:
RestHelpers.ExtractCookiesFromHeaders:570
- 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)