Differences

This shows you the differences between the selected revisions of the page.

guide_debugging_script 2023-01-20 guide_debugging_script (current)
Line 1: Line 1:
-====== Debugging WinSCP scripts and batch files ====== 
-This article summarizes useful techniques when debugging non-working [[scripting|WinSCP scripts]] and batch files. 
-===== Session Logging ===== 
-When using WinSCP scripting, even if it works currently, you always should have session logging enabled. To enable logging, add [[commandline#logging|''/log'' switch to WinSCP command-line]].  
- 
-<code batch> 
-winscp.com /ini=nul /script=script.txt /log=script.log 
-</code> 
- 
-The log file includes useful information for most problems you can encounter with WinSCP. 
- 
- 
- 
-===== Further Reading ===== 
- 
-  * [[faq_batch_file|*]] 
-  * [[guide_debugging_scheduler|*]] 
-  * [[faq_environment|*]] 
-  * [[faq_script_vs_gui|*]]