How can I monitor the communication between an installable MathLink program and the kernel? Can LinkSnooper do this?
|
Let me present an alternative approach. The whole commandline work and link naming and connecting can be simplified. What we need is the location of the LinkSnooper program and the location of your MathLink program and then you can set up everything in exactly one call to I have tried to make the following, where I demonstrate it with the Remark: In the following we will work with paths which probably contain evil characters like spaces which need a correct quoting. If something goes wrong, please check this first! Unfortunately, a Java VM is not provided by Wolfram for all systems. You have to ensure, that
On my machine this gives
As you can see, the call to the LinkSnooper is equivalent to the one in Szabolcs answer, but we let LinkSnooper start our MathLink program directly. The good thing is, that we are finished at this point. Just use
and the LinkSnooper pops up with all the traffic between you and the
|
|||||||||||
|
|
Here are step by step instructions. In the below commands change First launch LinkSnooper from the command line like this:
Be sure to quote paths with spaces properly. Here LinkSnooper will prompt you for the name of Now connect to
Connect to Now "install" the program into the kernel using the
command, and watch what's happening in the LinkSnooper console. |
|||||||||
|
|
LinkSnooper is a great tool any time you need to see what's traveling across a link. You can actually get it completely set up to monitor an installable MathLink program in a single The syntax for
When using LinkSnooper, it is not the .exe that you want to launch directly, but rather LinkSnooper as the intermediary. So this becomes
This example, for Windows, uses " to quote all embedded paths. On other platforms you might have to use ' instead.
|
|||
|
|
