scratchfoundation / scratchx

Scratch Extension Site
https://github.com/llk/scratchx
190 stars 120 forks source link

Where can you see the console.log() output of a scratch2.0 extension? #152

Closed janvda closed 1 year ago

janvda commented 6 years ago

I am busy creating an extension for scratch2 on my raspberry pi (version scratch-flash = ba2f624-dirty). I am loading this extension using the "Import experimental extension" menu.

In my extension javascript file I am using the console.log() command (like other extension developers do) but I have no clue where I can find this console.log() output.

So where can I find the console.log() output ? Or alternatively is there a different log command that I can use in the raspberry pi scratch2 (offline editor) that is somewhere visible ?

E.g. an extract of my extension with a console.log() command.

window.socket.onmessage = function (message) {
    var msg = JSON.parse(message.data);

                //
                var event=msg['event'];
                incomingMessages[event]=true;
              lastEventValue[event]=msg['value'];
    console.log(message.data)
};
f41ardu commented 5 years ago

I have a similar issue. A possible workaround is is to implement an UDP listener using node.js and to send log information from the extension script to that listener instead of the console.log.