My command line is via PUTTY.
I have just run
sbatch main.sh CUDA_LAUNCH_BLOCKING=1
Not sure this is what you meant. I normally run my code from VS Code rather than command line. However I also run it on a remote server as it takes time to run.