When I do download package to file system there is no .cs file under my business process folder, this business process should contain the script task of my business process for me to debug it in visual studio
I am sorry to hear that you experiences difficulties with this approach. I would like to offer you another approach to debug server code. I hope you will find it more suitable to work with:
Taking the file that you need into the new visual studio library project, you can attach the project to the IIS bpm'online process and debug the file as it described in the old article:
but skipping the part of the configuration. This will be the simplest approach: To take configuring steps from the new article but debugging from the old one.
Also, you may need to compile the system twice, before and after connecting to the IIS process in order to .cs files be exactly the same, in another case if files will be different, the breakpoints in visual studio will be gray and will not work.
Moreover, try to copy the file to a new project and place breakpoints in them, and try to drag and drop the original file from Terrasoft.WebApp\Terrasoft.Configuration\Autogenerated\Src to the main window of visual studio and place breakpoints in them too, after the attaching to the process and compiling the system, one of the approaches will definitely work for you.