How do I disable the stack tracing feature in Mathematica 11?

Is there a possibility to disable stack tracing, but keep messages?

Internal`$MessageMenu = False

reverts back to the old messages. Seems to do the trick and prevent the leak from my testing.


Analysis current as of Mathematica version 11.0.1 and 11.1.0.

We can disable the Show Stack Trace item in the new message menu as follows:

MessageMenu`$PruneStack;
MessageMenu`Dump`$IncludeStack = False;

The reference to MessageMenu`$PruneStack is there to ensure that the message menu packages have been autoloaded (otherwise our setting will be lost should the packages be loaded later).

Stack information is stored as down-values on the symbol MessageMenu`MessageStackList. We can reclaim any memory from earlier messages by executing ClearAll on this symbol. We can also inspect these down values to verify that the $IncludeStack setting is taking effect.