!--a11y-->
Monitoring and Debugging 
The connector includes several exception classes so that error handling is robust and natural for a Visual Studio developer. In addition to these exception classes, there is extensive debugging and tracing support built into the connector.
You can debug from your C# proxy directly into the SAP function module by setting the ABAP_DEBUGflag. Debugging through to the SAP system is useful when you are getting unexpected results back from the SAP system. To use the ABAP_DEBUGoption you must have installed SAPGUI on your developer workstation. You cannot use the integrated ABAP debug option with web applications because they run under another Windows context that is invisible to the interactive user.
Detailed traces can be written using the tracing flag. Alternatively you can set the environment variables RFC_TRACE and CPIC_TRACE to have trace files written to your application directory.
During initial design and debugging it is often useful to run the SAP RFCfunction directly in the SAP system using transaction SE37. It is easier to isolate the problem once you are sure that input values are valid. In addition, you should reference the SAP function module documentation. The SAP data dictionary, which is integrated in the function editor, also gives you information on valid input values.
In the SAP system, there are automatic formatting functions that are not available in the connector, for example to add leading zeroes to a customer or invoice number. If the function is working in the SAP system but not in your proxy, it could be that the SAP system has applied one of these automatic-formatting routines but you did not.
The SAP system provides extensive tracing and monitoring capabilities inside of the system as well, for example within the area Tools ® Administration ® Monitoring.