Home Insert std::cout in the beginning of a function or all functions using a eclipse plugin
Reply: 0

Insert std::cout in the beginning of a function or all functions using a eclipse plugin

user852
1#
user852 Published in June 20, 2018, 1:16 am

I often need to find out which functions are getting called in a C++ file. I am using Eclipse 3.7.0. The C++ file may be huge. I want to write a plugin which will detect the beginning of a function and insert a std::cout << "Function Name called !!" << std::endl

at the beginning in the code editor window. I think eclipse already detects functions since it does display the entire file structure in the Outline view. I would like to use this information to inject the cout statements. The 'Function Name' part should be replaced by the actual function name in the definition part of the function.

Is this even possible ? Where would I start ?

It would be even more awesome if I could insert couts automatically into all functions which call a particular function(say the one the cursor is in).

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.312812 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO