I am new to using the developer Console to debug my app code.
Can you please share some basics / pro tips about what I can do and how I would go about doing it?
For example how do I inspect variables, can I execute functions and can I use break points?
@forumfred great question!
When you have the debug console enabled (
JourneyScript.worker.js) you have access to the following:
- Variables on the current view:
- Call functions defined on the current view:
- Query the database:
- The current user object:
- Query and function execution details:
- Enable the “Verbose” log level in the console for this
In TypeScript apps, you can additionally set breakpoints:
- You can include a
debugger; statement in your app’s TS code, and this should pause execution when the debugger statement is reached if the debug console is open at the time.
- You can also access your app’s source files in the “Source” tab under the
JourneyScript.worker.js section and then set breakpoints:
- Or use the Open File command (⌘+P) to open a file
- Another option is to set the “Pause on (un)caught exceptions” setting, which will open the debugger if the debug console is open.