AppInspector is a powerful tool that makes it easy to inspect every resource of your application. With AppInspector, you can see the Safari developer tools in a clean, unified interface, which places each of its core functions in separate tabs. For more information on how to build, deploy, run the app, and simultaneously start AppInspector, click here.
AppInspector for iOS supports the following core functionalities:
- The Code Coverage Profiler: Shows you exactly which parts of your program have run and which haven't.
- The Type Profiler: Shows you type annotations next to important variables and function return types .
- By clicking the Start Recording button. This shows all activities that have occurred since the record button was clicked. To stop the profile, click the record button again.
- By including a
console.profile()in your script. To stop profiling, include
console.profileEnd()in your script or evaluate it in the Console.
Once you have captured one or more profiles, they are listed in the left side of Web Inspector. Every profiler shows the time spent in each function execution grouped in three categories: Self, Total and Average time. Where applicable, the source URL and line number of the function declaration is shown to the right of the function name. The source URL is a link. Clicking it opens the source in the content browser, scrolled to the line number where the function is declared.
The console offers a way to log diagnostic information to help debug your application.