WebPPL provides error messages that try to be informative. In addition there is debugging software you can use for WebPPL programs.
To debug WebPPL programs running in nodejs, use node debugger as follows:
my-program.wpplto indicate breakpoints.
Run your compiled program in debug mode:
node debug path/to/webppl my-program.wppl
Note that you will need the full path to the
webpplexecutable. This might be in the
libfolder of your
nodedirectory if you installed with
npm. On many systems you can avoid entering the path manually by using the following command:
node debug `which webppl` my-program.wppl
To navigate to your breakpoint within the debugger interface, type
c. At any break point, you can type
replto interact with the variables. Here’s some documentation for this debugger.