Distributive-Network / PythonMonkey

A Mozilla SpiderMonkey JavaScript engine embedded into the Python VM, using the Python engine to provide the JS host environment.
https://pythonmonkey.io
Other
854 stars 40 forks source link

Do not print the internal implementation line in the console trace method #360

Closed philippedistributive closed 5 months ago

philippedistributive commented 5 months ago

Console.trace's own context should not be printed in the output but it is now:

With import pythonmonkey as pm pm.eval('function foo(){ function bar() { console.trace() } bar(); } foo();')

get

Trace _home_philippe_Sources_PythonMonkey_python_pythonmonkey_builtin_modules_console_js/Console/this.trace@/home/philippe/Sources/PythonMonkey/python/pythonmonkey/builtin_modules/console.js:104:22 bar@evaluate:1:42 foo@evaluate:1:52 @evaluate:1:61

Now fixed to

import pythonmonkey as pm pm.eval('function foo(){ function bar() { console.trace() } bar(); } foo();')

gets

Trace bar@evaluate:1:42 foo@evaluate:1:52 @evaluate:1:61