How to determine the Biztalk host process for debugging
We can debug for example, external assembly’s that are called from within a BizTalk process or debugging pipeline components in run-time mode. In Visual Studio set breakpoints in your code. To debug you must attach to the BizTalk process that is running the .Net code.
- Click on the Debug menu is Visual Studio and select the Process menu item.
- When the Available Processes dialog opens find and select the BTSNTSvc.exe process.
- Click on the Attach button.
The problem is however when multiple BizTalk host instances are running.
For each running host intance you’ll see the same process name ‘BTSNTSvc.exe’ in the overview.
You can of course attach visual studio to all BizTalk host instances.
But what when you want to attach to only one host instance?
You can determine the correct host instance on 2 different ways:
- You can use the TASKLIST command to query the processes. Execute the following command in a command prompt on the remote box:
TASKLIST /FI “USERNAME ne NT AUTHORITYSYSTEM” /FI “IMAGENAME eq BTSNTSvc.exe” /SVC
- Or you can use this application (EnumerateBiztalkProcesses), it shows you the memory consumption and process id of all running BizTalk hosts
Original Blog by Sandro Pereira: Debugging External assembly’s or pipeline components – Attach to Process – which BizTalk process to use?