What is the simplest way to set up LinkSnooper to monitor the communication between the Kernel and the Front End?
I am looking for an answer that works on all platforms, including 32-bit Windows.
What is the simplest way to set up LinkSnooper to monitor the communication between the Kernel and the Front End?
I am looking for an answer that works on all platforms, including 32-bit Windows.
Use the following command to create a new kernel setup with the name "LinkSnooper":
CurrentValue[$FrontEnd, {EvaluatorNames, "LinkSnooper"}] = {
"AutoStartOnLaunch" -> False,
"MLOpenArguments" -> "-LinkMode Launch -LinkName '\"`javaw`\" -classpath \"`jlinkjar`\" com.wolfram.jlink.util.LinkSnooper -kernelname \"`mathkernel`\" -noinit'"
}
Alternatively, use the Evaluation → Kernel Configuration Options... menu to enter the same information.
This has been tested on 64-bit and 32-bit Windows, as well as on OS X.
The words enclosed in backticks (`
symbol) are templates which will be automatically filled out by the front end with the correct path to Java, JLink.jar
and the kernel. Some of these are placed within "..."
in case the paths contain spaces. On some systems (e.g. OS X) this might still not work if there are spaces in Mathematica's path: in this case move Mathematica to a location with no spaces.
To use this kernel configuration for a notebook, evaluate the following within the notebook:
CurrentValue[EvaluationNotebook[], Evaluator] = "LinkSnooper"
Alternatively, check LinkSnooper in the Evaluation → Notebook's Kernel menu.