Java Script debugging


#1

I’m trying the trace as used in the demo script as well as console.log but both are not outputing anything. Is there something specific i am doing wrong?


#2

Hi lllusiveMatter,
Please provide more details of the issue.
What software you used?
What is the main board you used?
What is the operating system of your PC?
Is there any error message? Can take screen shot or take a video?
Any other details will be appreciated.


#3

Hi,

I’m using mblock and arduino. I’m trying to develop my own extention and would like to log to the arduino mode console (on the bottom right) as demonstrated in the demo extention Java script, though the log doesn’t appear when I use trace function.


#4

I also tried using window.alert(“sometext”); inside the processData function but it never gets called. Not sure if window.alert is not functional within the processData function (its working fine when used in one of the blocks) or if the processData function is indeed not called when stream data is received from the arduino device?


#5

it’s not functional. mBlock 3.0 series runs on Flash, so the Javascript environment is not standard. trace(string) function will print a log over the console under Arduino Mode. Please refer to this document:

http://download.makeblock.com/mblock/mblock_extension_guide.pdf