How to debug queries and exports sent to Salesforce? I'm using Salesforce Suite module.

My initial investigation says that the connection is encrypted via HTTPS.

Is there any easy way of debugging what is exactly sent to Salesforce?

I ended up by tracing the code via XDebug, but it's useless on environment which doesn't have it.

The module uses SalesforceSoapClient.
If you're using Ubercart / Salesforce Integration, you can use the following patch:

Drupal 6

--- a/uc_salesforce/uc_sf_order/uc_sf_order.module
+++ b/uc_salesforce/uc_sf_order/uc_sf_order.module
@@ -635,6 +635,7 @@ function uc_sf_order_export($order, $name, $sfid = NULL, $manual = FALSE) {
     // Export the object to Salesforce.
     try {
       $response = $sf-&gt;client-&gt;create(array($object), $map-&gt;salesforce);
+      drupal_alter('uc_sf_order', $response, $sf);
     }
     catch (Exception $e) {
       drupal_set_message(t('Error exporting order to Salesforce.'), 'error');
@@ -681,6 +682,7 @@ function uc_sf_order_export($order, $name, $sfid = NULL, $manual = FALSE) {
         }
         try {
           $product_responses = $sf-&gt;client-&gt;create($product_objects, $uc_order_products_fieldmap-&gt;salesforce);
+          drupal_alter('uc_sf_order', $product_responses, $sf);
         }
         catch (Exception $e) {
           sf_dpm($e-&gt;faultstring, 'Ubercart order line item exception');
@@ -718,6 +720,7 @@ function uc_sf_order_export($order, $name, $sfid = NULL, $manual = FALSE) {
       else {
         $user_object_export = salesforce_api_fieldmap_export_create($user_map_id, $account);
         $user_response = $sf-&gt;client-&gt;create(array($user_object_export), $user_map-&gt;salesforce);
+        drupal_alter('uc_sf_order', $user_response, $sf);
         $account_sfid = $user_response-&gt;id;
       }
     }


and then you can define the following function:

&lt;?php
/**
 * Define debug constant
 * To activate, run: drush -y vset foo_debug 1
 */
define('FOO_DEBUG', variable_get('foo_debug', FALSE));

/**
 * Implements hook_TYPE_alter().
 */
function foo_uc_sf_order_alter($response, $sf) {
  $xml_request = $sf-&gt;client-&gt;getLastRequest();
  $xml_response = $sf-&gt;client-&gt;getLastResponse();
  FOO_DEBUG ? watchdog('foo', "UC Salesforce XML request/response:\n&lt;br&gt;Request:\n@req\n&lt;br&gt;Response:\n@res", array('@req' =&gt; $xml_request, '@res' =&gt; $xml_response), WATCHDOG_NOTICE) : NULL;
} 
?&gt;


To activate debug messages, run the following drush command:

drush -y vset foo_debug 1


And run watchdog messages in foreground before your test:

drush watchdog-show --tail --full


Read more:

Add hook_alter for catching and debugging the requests and responses.