Ask a Question

Is there a way to return the name of the current sub routine or function?

adrian_g
Occasional Contributor

Is there a way to return the name of the current sub routine or function?

Hi All,



Is there a way to return the name of the current sub routine or function that is being run. It would be nice to enter into the log.



I am currently coding in VB Script.



I assume there is no way to do it using VB script but is there a TestComplete inbuilt function?



Thanks  heaps,

Adrian
29 REPLIES 29
ananddave123
Occasional Contributor

How can we do it in VB Script ??

steveburton4
Occasional Contributor

Bit late but would like to add my vote for this too.
TanyaYatskovska
SmartBear Alumni (Retired)


@Steven, your vote was counted.


 


@Anand, I guess that you will have to create a script extension and execute the JScript code there. You can call this script extension from any of your VBScript projects.


 

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager



Abhijeet_Bhagat
New Contributor

Hi,



when i add the above code to script extension then i get following error


'arguments.callee.caller' is null or not an object


 


Microsoft JScript runtime error


 


code.js 



obviously script extension does not work for getting th running routine name.



~Abhijeet

Thanks, --Abhijeet Bhagat
Morgan
Frequent Contributor

I'd like to add my vote to this as well.  
TanyaYatskovska
SmartBear Alumni (Retired)


Hi Morgan,


 


Done. Thanks for your participation.

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager



snagarale
Not applicable

This is going to be useful in my project also. Please count my vote.
Abhijeet_Bhagat
New Contributor

please count my vote as well for this feature being available via vbs
Thanks, --Abhijeet Bhagat
TanyaYatskovska
SmartBear Alumni (Retired)


Hi Guys,


 


I've added your votes, as well. Thanks.

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager



jlucktay
Occasional Visitor

Hi, I'd like for this functionality to be added to VBScript too. Please add a vote from me.
cancel
Showing results for 
Search instead for 
Did you mean: