Learner-friendly scripting environment in GeoGebra for informatics class

s_o shared this idea 6 years ago


some learners asked me if and how I created/programmed the GeoGebra worksheets and asked why they couldn't do something like that in informatics class.

I thought that would be a great idea: With JavaScript there is a very good programming language with C-like syntax and all concepts of a basic informatics class (variables, objects, functions, if, while, for...) can be introduced very useful within the GeoGebra context. And using GeoGebra methods the program can easily interact with the user graphically, without the learners having to learn any complicated API (and with clever tasks you can make them learn math and informatics at the same time).

But there is one point that makes usage in school environment impossible:

Scripting inside the GeoGebra application is cumbersome to say the least, I always wrote the scripts outside GeoGebra and zipped the ggb manually, but that is no solution for learners.

What I would love to see is a "Script View", like Algebra, CAS or Graphics view, the scripts not hidden somewhere in the dialogs. From there you could access all scripts, the main script (geogebra_javascript.js) and the scripts of all objects. And the editor should have all common features of a programming editor (syntax highlighting, automatic code indention, code folding, auto completion, context-sensitive help, highlighting of syntax errors)... Debug functions (breakpoints, call stack,...) would also be a nice feature. An GeoGebra IDE :)

Of course this is long-term idea, but maybe this functionally can be taken from some library or other open-source IDE. I would really love to see that in GeoGebra in a future version, this would open GeoGebra for a new subject and would be so much better than what is currently done in many informatics classes (Excel).

Best regards


Comments (5)


Do you know that there some turtle commands?



I do now and I already imagine how that could be used (a simple game like the turtle is moving automatically using setInterval and is not allowed to touch a circle (fall into the water)).

Although accessing the turtle using the browser command console is very simple, writing functions is still highly complicated without a nice programming environment. I'm not talking about 6th graders that should play little, but grades 11-13 (Age around 16-19), that should learn about fundamental concepts in informatics and use them to write simple programs with simple algorithms.

By the way, while calling functions in the browser is easy, debugging GeoGebra is extremely hard: The JavaScript is created dynamically by unzipping the GGB file, so everytime you reload all breakpoints etc. are gone. It would already be huge improvement if one could load an unzipped GGB (the JavaScript and the XML file independently) with the JavaScript having a fixed URI.


You can put the JavaScript inline if you change

  1. "useBrowserForJS":false,


  1. "useBrowserForJS":true,


If I change useBrowserForJS to true for me the Javascript of the file is not loaded at all. I've asked that before and never got an answer, is there a documentation of the applet somewhere? Is it possible to load the XML and JS independently?

Very sad to read that this idea is declined without any further comment or explanation.


I support the Peter asking of an IDE for the GeoGebra javaScript programming.With an IDE, would be so easy to go to each module of a program, joined to all the advantages described by Peter. And, we would have a monospaced typography for the code. To write code with a not monospaced font it's really annoying.

© 2023 International GeoGebra Institute