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)




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:



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



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


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


Step 6:. Restart the application

Step 7: Verify results in the Workstation:



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



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:



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



File Attachments: