How to instrument a Standalone .NETApp

Document ID : KB000056583
Last Modified Date : 14/02/2018
Show Technical Document Details

Case Scenario: Instrument 2 .NET standalone applications: DummyWinApp.exe and TestLeak.exe.

Click here to download all test applications and supplementary files.


Step 1
: Study the application design, you can use Visual Studio (just need to drag and drop the dll/exe)

0a.jpg

0b.jpg

 

Step 2: Create dummysample.pbd to instrument all the classes and methods.

SetFlag: CustomTracer
TurnOn: CustomTracer
IdentifyMatchingClassesAs: [DummyWinApp]* CustomTracer
IdentifyMatchingClassesAs: [TestLeak]* CustomTracer
TraceAllMethodsIfFlagged: CustomTracer BlamePointTracer "Custom|{classname}|{method}"
TraceAllMethodsIfFlagged: CustomTracer BlamePointTracer "Custom|{classname}|{method}"

 

Step 3: Add the dummysample.pbd to the IntoscopeAgent.profile:

1.jpg

 

Step 4: Configure the agent to instrument all .NET applications by commenting out the monitorApplications property, as below:

#introscope.agent.dotnet.monitorApplications=w3wp.exe,aspnet_wp.exe

 

Step 5: Set permissions to the wily directory using wilypermissions.exe:

Syntax: WILY_AGENT_HOME\wilypermissions.exe WILY_AGENT_HOME  <.NET app process name>

NOTE:  the <process name> can be obtained from the Task Manager

4.jpg

“C:\Introscope 9.1.0.0.NETAgent\wily\wilypermissions.exe” “C:\Introscope 9.1.0.0.NETAgent\wily “ TestLeak.exe
“C:\Introscope 9.1.0.0.NETAgent\wily\wilypermissions.exe”“C:\Introscope 9.1.0.0.NETAgent\wily”  DummyWinApp.exe

 

Step 6:. Restart the application

Step 7: Verify results in the Workstation:

6.jpg

 

Step 8: Review instrumented methods and classes in the .NET Agent Autoprobe.log :

7.jpg

 

Step 9: You can use Dottie application to refine the instrumentation, it can help you with on the pbd creation:

a)      Open pbd using Dottie:

9a.jpg

 

b)      Select the method you are interested. Dottie will generate required lines for you automatically:

9b.jpg

 

File Attachments:
TEC1797023.zip