Debug QTP scripts
Question ID: 104620

Does anybody have suggestions for debugging a script that crashes QTP and AUT? I am not sure which line of the code is causing the problem. Running in debug step mode does not cause the problem. Another part of the problem is it takes over 15 minutes of running the test script to get to area of test where the crash occurs. Does anybody have suggestion on how I can find what line is causing the problem beside with out many test runs.

Marked as spam
Posted by (Questions: 2, Answers: 98)
Asked on October 1, 2012 11:20 am
Answers (1)
Private answer

I have used the QuickTest Print Log for trouble shooting. This displays information in the QuickTest Print Log window during the run session. The QuickTest Print Log window remains open while the run session continues, until you close it.

The QuickTest Print Log is stored at %Temp$QTPrintLog.txt and you can use it to find location of errors.

I have created a function library for debugging which does help out.

Function   myDebug(myMsg)
	If debugMode then
		print now &''  '' &  myMsg
	End if
End Function

' line of code
'line of code
myDebug('' test  line 2'')
'line of code
myDebug ( '' zVar= '' & zVar)
Marked as spam
Posted by (Questions: 2, Answers: 98)
Answered on October 1, 2012 11:34 am

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

Scroll to Top