Home/Support/Support Forum/turn on debug on module level
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

turn on debug on module level

0 votes
To turn on debug on function level as follow
debug scofunc int handshake(void) { // code }

My question: How to turn on debug on module level?
asked May 25, 2015 in Rabbit Software by edha Community Contributor (71 points)

Please log in or register to answer this question.

1 Answer

0 votes
Best answer
There is no direct method for this but if you look at the libraries supplied with DC you will see how they use a macro to allow you turn on and off debug for each library.

For example, ip.lib has the following:

#ifdef IP_DEBUG
#define _ip_nodebug __debug
#define _ip_nodebug __nodebug

Each function then has _ip_nodebug as a prefix so you can turn on and off debug for the lib by defining the IP_DEBUG macro if you want debugging or leaving it undefined if you do not.

answered May 26, 2015 by petermcs Veteran of the Digi Community (1,132 points)
selected May 26, 2015 by edha
Thank you, for your point out.