pythontutor-dev / pythontutor

10 stars 4 forks source link

JavaScript backend: abbreviate the display of 3rd-party imported objects #52

Open pgbovine opened 6 years ago

pgbovine commented 6 years ago

implement the JavaScript analogue of https://github.com/pgbovine/OnlinePythonTutor/issues/222

... this hopefully gets rid of some huge explosions in the trace/viz. e.g., if you run:

const path = require('path');

... the visualization just explodes in size. like in python, we should try to detect whether these objects came from an external module. and also another heuristic there is to display only the first N lines of a function's code (and to further clean up function code indentation displays) to prevent it from getting too long.