Steps to prepare your BizTalk environment for diagnostics

Posted: May 26, 2011 in BizTalk
Tags: , ,

In the past I publish an article about “An unhandled exception (‘<System.StackOverflowException>’) occurred in BTSNTSvc.exe with the promise that I would explain in detail how I was able to debug the .NET stack using the Microsoft Symbol Server to obtain debug symbol files, and now is the time Sorriso.

Step 1: Prepare the environment for debug (set up the Symbol Server):

First one note: if you are using a Lab environment with Visual Studio, like me, skip step 1 and 2.

  1. Download the Debug Tools: http://msdn.microsoft.com/en-us/windows/hardware/gg463009
  2. Install this Debug Tools in: “c:\tools\debug”
  3. Download Sysinternals: http://technet.microsoft.com/en-us/sysinternals/bb842062
  4. Unzip the tools to: “c:\tools\bin”
  5. Go to “Control Panel -> System -> Advanced -> Environment Variables”control-panel-Environment-Variables
  6. In “System Variables” section, press “New” and add the following variable:
    1. Variable name: “_NT_SYMBOL_PATH
    2. Variable value: “SRV*c:\websymbols*http://msdl.microsoft.com/download/symbols

control-panel-Environment-Variables-new-system-variable

  1. In the “User variables for user” section, press “New” and add the following variable:
    1. Variable name: “PATH
    2. Variable value: “C:\tools\bin

control-panel-Environment-Variables-new-user-variable

  1. Press the OK button twice.

 

Step 2: Prepare theProcess Monitor":
  1. Run procmon.exe
    run-procmon
  2. Go to the menu option “Options -> Configure Symbols”
    procmon-Configure-Symbols
  3. Ensure that the “DBGHELP.DLL” path is equal to “C:\TOOLS\DEBUG\dbghelp.dll” or is one path of the version used in Visual Studio
  4. Ensure that the “Symbol Path” is equal to “SRV*c:\websymbols*http://msdl.microsoft.com/download/symbols
    procmon-Configure-Symbols-values
  5. Press OK button

 

Step 3: Prepare theProcess Explorer":
  1. Run “procexp.exe
    run-procexp
  1. Go to the menu option “Options -> Configure Symbols”
    procexp-Configure-Symbols
  1. Ensure that the “DBGHELP.DLL” path is equal to “C:\TOOLS\DEBUG\dbghelp.dll” or is one path of the version used in Visual Studio
  2. Ensure that the “Symbol Path” is equal to “SRV*c:\websymbols*http://msdl.microsoft.com/download/symbols
    procexp-Configure-Symbols-values
  1. Press OK button

 

Now when the exception occurs, the system will automatically instantiates one Visual Studio instance with the trace .NET stack, giving me the exact point of the problem.

References:

 

Once again I want to thank Jorge Lourenço for help!

Tags: BizTalk | Debug | .NET

About these ads
Comments

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s