extends ../template block content h3 DevBug supports ECMAScript on the web. p To use the client, include the ECMAScript client file in your application, as early as possible. This file is hosted by your local DevBug server, and is available here. Then, set the project API key and server addresses (see the code snippet below). This gives you access to the global out() and breakpoint() functions. Here's how to use them: h4 out(info, data) - output data to DevBug p This function is similar to logging data. It stores data to be outputted to DevBug. The first parameter should be a string with a brief description of the data, and the second is the data to be outputted. Note that the info string should be unique and multiple outputs with the same name will overwrite their predecessors. It's important to note that calling this function doesn't actually send any data to DevBug. Instead, it stores it to be sent. h4 breakpoint(continue = false, name = "") - send the outputted data to DevBug p This is the magic of the operation. When this function is called, any data that has been passed to the output function will be sent to the DevBug server and stored under the configured project. There are several things you can change about this function. The continue parameter determines whether or not program execution continues, or if the interpreter's exit method is called. The name parameter allows you to change the name of the breakpoint. This can be useful to help distinguish multiple breakpoints in the DevBug dashboard. Note that the continuation parameter is non-functional in browser-based ECMAScript. Instead, the breakpoint throws an exception. pre#editor.inline // Run the following as early in your application as your can: devbug_url="http://localhost:8000/"; project_api_key="CHANGEME"; block scripts script(src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.5/ace.js") script. const editor = ace.edit('editor'); editor.setTheme('ace/theme/cobalt'); editor.session.setMode('ace/mode/javascript'); editor.setOption('readOnly', true);