Hi Community,

How can I debug a script task from like setting some break point and tracing codes line by line.

Thanks

Like 0

Like

6 comments

See this

Dear Fulgen,

You can use the link provided in the previous comment by Grigory:

https://academy.bpmonline.com/documents/technic-sdk/7-12/working-server…

Since Script Task is the chunk of C# code, it can be treated as other C# code in the system.

The article provides steps to perform debugging, please use them to debug Script Task.

Regards,

Anastasia

Anastasia Botezat,

Hi Anastasia,

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

Dear Fulgen,

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:

https://academy.bpmonline.com/documents/technic-sdk/7-12/server-code-debugging

Regards,

Anastasia

Anastasia Botezat,

Hi Anastasia,

I already done this application setup below

I also made sure that the value of CompilerSourcesTempFolderPath directory is existing. But no schema source code was exported.

 

Dear Fulgen,

Please revert all that you do on the screenshot, this approach is deprecated. Afterwards, please change only one thing from the main article https://academy.bpmonline.com/documents/technic-sdk/7-12/visual-studio-… and this thing is setting:

<fileDesignMode enabled="true" /> in the main Web.config file and <add key="UseStaticFileContent" value="false" />



After that compile the application, and within the compilation following folder will be populated with all of the .cs files that you need:

your_path_to_bpmonline\Terrasoft.WebApp\Terrasoft.Configuration\Autogenerated\Src

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:

https://academy.bpmonline.com/documents/technic-sdk/7-12/server-code-de…

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.

 

Show all comments