What does this program do? Is this a commercial program or something that you or someone in your organization developed?
If it's "your code", then have your developer add proper error handling and logging functionality to it so that you know exactly what the program was trying to do and what error it got. There should be a global try/catch to intercept errors. Key processing events along with errors should be written to a log file so that you can troubleshoot unattended executions of the program like you are trying to do with the task scheduler.
If this is a commercial program, they typically have logging built in. Consult the product documentation or contact product support and find out how to enable logging. (Have you checked the Windows Application event log?)
Hopefully this is a command line program that writes to stdout/stderr. Configure the scheduled task to capture that output.
Create a bat file that executes your program. Echo %date% %time% as the first and last line the .bat so that know when the task starts and ends.
@echo %date% - %time% MyScript is starting.
SomeProgram.exe
@echo %date% - %time% MyScript is ending. SomeProgram RC=%errorlevel%
Then change the scheduled task to execute program "cmd.exe".
In the arguments field set it like this example:
/c C:\Scripts\MyScript.bat 1>>"C:\Scripts\Logs\MyScript-%date:~10,4%-%date:~4,2%%date:~7,2%.log" 2>&1
That will create a daily log file of all executions of the task. That will capture stdout and stderr for programs that get called. Review that log for errors.
If the program accesses network shares, add a "dir" command to the bat file to verify that the account that the task runs as has access to the share.