Ejecta icon indicating copy to clipboard operation
Ejecta copied to clipboard

Debugging and Profiling

Open talltyler opened this issue 11 years ago • 2 comments

I have been using the web browser on a desktop outside of Ejecta to profile and debug everything within the app that I am creating. This works ok with validation of platform similarity with console.log messages when needed, but really Ejecta needs more. We need a way to really profile and debug what is happening in JavaScript.

WebUIViews within apps can connect to Safari on the desktop and use the browsers debug tools for the remote app. Maybe we can hook into this? I have no idea how this works but if we can't get at this how about getting at the same type of data within the Xcode debugging tools? Maybe this could be a mode that can be turned off, but when it is on it just pumps all of the processes meta data to a file or something. Even a text file with information about the state will be better than nothing and other stuff can be built on top of it. I would be happy to make something to graph all of this if we can't use the tools already available.

Another option would be to add these methods

window.performance.memory.totalJSHeapSize;  // currently used heap memory
window.performance.memory.usedJSHeapSize; // total heap memory

But really this isn't really good enough, a full profiler would be much better. I'm totally open to other options but only having console.log is a bummer.

talltyler avatar Jul 22 '13 19:07 talltyler

This won't really help with the JavaScript side of things, but it may help with the iOS side: https://github.com/square/PonyDebugger

subtleGradient avatar Aug 26 '13 11:08 subtleGradient

Strongly agree. I had also looked a bit into the possibilities of linking up the view with the web inspector (see http://reality.hk/2014/01/10/debugging-javascriptcore-using-safari-web-inspector/) but sadly don't have the time to get into it right now...

t3db0t avatar Jun 07 '14 03:06 t3db0t