CURL.SetDebugWithTime
---------------------

Sets whether times are included in debug log.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [CURL](component_CURL.md) | [6.2](newinversion62.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "CURL.SetDebugWithTime"; curl; Value ) 

**MBS**( **"CURL.SetDebugWithTime";** /\* Sets whether times are included in debug log. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$Value**) /\* Pass 1 to include times or 0 to not include them.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| curl | The CURL session handle. | $curl |
| Value | Pass 1 to include times or 0 to not include them. | 1 |

### Result

Returns OK or error.

### Description

Sets whether times are included in debug log.  
This allows you to monitor what happens when.  
e.g. see if login takes 10 seconds instead of 0.1.  
Default is off.  
  
This must be set before you call [CURL.Perform](CURLPerform.md) function, so [CURL.GetDebugMessages](CURLGetDebugMessages.md) will include timestamps in the log.  
### Examples

Load text and log with times:

 #Start new session   
Set Variable \[$curl ; Value:MBS ("[CURL.New](CURLNew.md)")\]  
\#Set URL to load (HTTP, HTTPS, FTP, FTPS, SFTP, etc.)   
Set Variable \[$result ; Value:MBS ("[CURL.SetOptionURL](CURLSetOptionURL.md)"; $curl ; CURL Test::URL )\]  
\#RUN now   
Set Field \[CURL Test::Result ; MBS ("CURL.SetDebugWithTime"; $curl ; 1)\]  
Set Field \[CURL Test::Result ; MBS ("[CURL.Perform](CURLPerform.md)"; $curl )\]  
\#Check result   
Set Field \[CURL Test::Text ; MBS ("[CURL.GetResultAsText](CURLGetResultAsText.md)"; $curl ; "UTF8")\]  
Set Field \[CURL Test::header ; MBS ("[CURL.GetHeaders](CURLGetHeaders.md)"; $curl )\]  
Set Field \[CURL Test::debug ; MBS ("[CURL.GetDebugMessages](CURLGetDebugMessages.md)”; $curl )\]  
\#Cleanup   
Set Variable \[$result ; Value:MBS ("[CURL.Release](CURLRelease.md)"; $curl )\]  
Enable advanced logging to debug a problem:

 # Trace to file with times   
Set Variable \[ $r ; Value: MBS ( "Trace"; "/tmp/mbs .log" ) \]  
Set Variable \[ $r ; Value: MBS ( "[Trace.SetWithTimes](TraceSetWithTimes.md)"; 1 ) \]  
\#   
\# Debug log for CURL with additional data:   
Set Variable \[ $r ; Value: MBS ( "CURL.SetDebugWithTime"; $curl ; 1 ) \]  
Set Variable \[ $r ; Value: MBS ( "[CURL.SetDebugWithProgress](CURLSetDebugWithProgress.md)"; $curl ; 1 ) \]  
\#   
\# and define some timeouts   
Set Variable \[ $r ; Value: MBS ( "[CURL.SetOptionConnectTimeoutMS](CURLSetOptionConnectTimeoutMS.md)"; $curl ; 10000 ) \]  
### See also

- [CURL.GetDebugWithData](CURLGetDebugWithData.md)
- [CURL.GetHeaders](CURLGetHeaders.md)
- [CURL.GetResultAsText](CURLGetResultAsText.md)
- [CURL.New](CURLNew.md)
- [CURL.Perform](CURLPerform.md)
- [CURL.SetDebugWithProgress](CURLSetDebugWithProgress.md)
- [CURL.SetOptionConnectTimeoutMS](CURLSetOptionConnectTimeoutMS.md)
- [CURL.SetOptionVerbose](CURLSetOptionVerbose.md)
- [Trace](Trace.md)
- [Trace.SetWithTimes](TraceSetWithTimes.md)

### Example Databases

- [CURL/SFTP/CURL sFTP Upload File](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/SFTP/CURL%20sFTP%20Upload%20File.shtml#7ScriptAnchor_)

### Blog Entries

- [Translating Insert from URL options for CURL to MBS Plugin calls](https://www.mbsplugins.de/archive/2020-12-14/Translating_Insert_from_URL_op/monkeybreadsoftware_blog_filemaker)
- [Debugging problems on FileMaker Cloud for AWS](https://www.mbsplugins.de/archive/2019-06-30/Debugging_problems_on_FileMake/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 6.2pr10](https://www.mbsplugins.de/archive/2016-05-20/MBS_FileMaker_Plugin_version_6/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 14th May 2016 , last changed 5th September 2025

  
[CURL.SetDebugWithProgress](CURLSetDebugWithProgress.md) - [CURL.SetFailedEvaluate](CURLSetFailedEvaluate.md)

[HTML Version](CURLSetDebugWithTime.shtml)