Re: how to debug, not understanding safe_primitive
Torbjörn Lager <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <CA+Y3JZhpcvcQvOPHEW3UVm9WGk5BY1TfYArqfTW2KSpejo+cRQ@mail.gmail.com> |
On Fri, Feb 7, 2014 at 11:01 AM, Jan Wielemaker <[email protected]> wrote: > What probably needs to be done is to have a pengine_debug/2 that calls > pengine_output/1 and a default handler in the pengines.js to display that > information in a sensible place in the browser (console?). Torbjörn? Yes, that's a good idea! However, instead of calling pengine_output/1 we could introduce a new "debug" event for it. The JSON could be {"event":"debug", "id": <ID>, "data": <Debug message>}. Then, in the JS client's event loop, if "ondebug" is not handled explicitly, we simply call console.log(<ID> + ":" + <Debug message>). - Torbjörn -- Torbjörn Lager Professor of General and Computational Linguistics Department of Philosophy, Linguistics and Theory of Science University of Gothenburg Box 200, SE-405 30 Gothenburg, Sweden Phone: +46317864962