Running External Programs under a Debugger
The Wolfram Symbolic Transfer Protocol (WSTP) allows you to run external programs under whatever debugger is provided in your software environment.
WSTP‐compatible programs are typically set up to take arguments, usually on the command line, which specify what WSTP connections they should use.
In debugger: |
run -linkcreate -linkprotocol TCPIP
|
In the Wolfram Language: | Install[LinkConnect["port",LinkProtocol->"TCPIP"]] |
Note that in order to get a version of an external program that can be run under a debugger, you need to compile the program so that the output is suitable for use with your debugger. Unix compilers commonly use -g as a command-line argument for producing a debuggable program. See your compiler documentation for specific information on the steps you should take.
Unix debugger
break f
Breakpoint set: f: line 1
run -linkcreate -linkprotocol TCPIP
Link created on: 2981@frog.wolfram.com,2982@frog.wolfram.com
Wolfram System session
Unix debugger
Breakpoint: f(16)
continue