parent
8b8c636cff
commit
db536010d4
@ -1,4 +1,12 @@
|
||||
extends ./template
|
||||
block content
|
||||
pre#editor(style="height: 75%;") #{prettyd}
|
||||
script(src='/assets/dash_v1.js')
|
||||
script output(syntaxHighlight(`#{prettyd}`));
|
||||
|
||||
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/json');
|
||||
editor.setOption('readOnly', true);
|
||||
|
@ -0,0 +1,13 @@
|
||||
extends ../template
|
||||
block content
|
||||
h3 DevBug supports anywhere within the reach of your network.
|
||||
p You can use DevBug in any language that supports sending multipart/form-data POST requests. This is accomplished via the DevBug API. This is the same procedure the native DevBug clients use. The API is fairly simple to use and contains a single endpoint. The snippet below details how to use it:
|
||||
pre#editor #{devbug.code.api}
|
||||
|
||||
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);
|
@ -0,0 +1,17 @@
|
||||
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 <a href="/assets/agents/web.js" target="_blank">here.</a> Then, set the project API key and server addresses (see the code snippet below). This gives you access to the global <code>out()</code> and <code>breakpoint()</code> functions. Here's how to use them:
|
||||
h4 <code>out(<i>info</i>, <i>data</i>)</code> - 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 <i>send</i> any data to DevBug. Instead, it stores it to be sent.
|
||||
h4 <code>breakpoint(<i>continue = false</i>, <i>name = ""</i>)</code> - 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 <code>continue</code> parameter determines whether or not program execution continues, or if the interpreter's exit method is called. The <code>name</code> 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.
|
||||
pre#editor // 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);
|
@ -0,0 +1,51 @@
|
||||
extends ../template
|
||||
block content
|
||||
h2 Welcome to DevBug!
|
||||
p DevBug is a development helper tool designed to make it easy to collect program output and code snippets for your projects.
|
||||
| The basic principle here is that you include DevBug's inline-helper scripts which provide helper functions.
|
||||
| You can call these helper functions from your code to output data. When a breakpoint is reached, that data is sent to
|
||||
| the DevBug server as JSON, where it is logged in a project along with some other information about the breakpoint.
|
||||
| You can then view the outputs through the DevBug console. DevBug is designed to be hosted on the local network of the
|
||||
| developers who use it. This alleviates some worries about code and development output being sent over the open web.
|
||||
p Because output data is sent over HTTP, DevBug is helpful for debugging software that may run in an environment where the direct output is not easily accessible.
|
||||
p Inline helper functions are included with DevBug for the following languages (however, the DevBug api is easy to use, even if your favorite language isn't supported):
|
||||
br
|
||||
ul(style='list-style-type: none; margin: 0; padding: 0;')
|
||||
li.action-li
|
||||
a.btn(href='./node') Node.js
|
||||
li.action-li
|
||||
a.btn(href='./ecma') JavaScript (Web)
|
||||
li.action-li
|
||||
a.btn(href='./php') PHP
|
||||
li.action-li
|
||||
a.btn(href='./api') DevBug API
|
||||
br
|
||||
h3 Changelog
|
||||
h4 v0.5.1 - Use Ace.js for Outputs
|
||||
ul
|
||||
li Switched over to use Ace.js to view development output. Might make this a user preference in the future.
|
||||
|
||||
h4 v0.5.0 - Better Documentation and UI
|
||||
ul
|
||||
li Improved the "Using DevBug" section to be more readable and accessible.
|
||||
li Added individual pages for each of the supported languages with details on the client functions.
|
||||
li Use a consistent button theme throughtout the application.
|
||||
|
||||
h4 v0.4.0 - Snippets
|
||||
ul
|
||||
li Projects can now contain various code snippets.
|
||||
li These snippets can be shared individually with view/edit/transfer/invite support.
|
||||
li Users with view/edit access to the parent project automatically inherit these permissions.
|
||||
li Snippets make use of the Ace.js embedded editor, which provides syntax highlighting.
|
||||
|
||||
h4 v0.3.0 - Sharing!
|
||||
ul
|
||||
li DevBug now supports sharing project with other users.
|
||||
li This includes view/edit mode, as well as the ability to transfer ownership of a project to that user.
|
||||
li Projects can also be shared via invitation URL. If the recipient doesn't have an account on this DevBug server, they will be prompted to create one.
|
||||
|
||||
h3 About
|
||||
p Copyright (C) 2019 Garrett L Mills.
|
||||
p
|
||||
| DevBug is licensed under the GNU Affero GPL Version 3. Read more about what that means
|
||||
a(href="https://choosealicense.com/licenses/agpl-3.0/" target="_blank") here.
|
@ -0,0 +1,17 @@
|
||||
extends ../template
|
||||
block content
|
||||
h3 Node.js has a first-class DevBug client.
|
||||
p To use the client, install the <code>devbugjs</code> package from NPM. Probably best to include this in your development dependencies. Then, run the following code as early in your application initialization as you can. This gives you access to the global <code>out()</code> and <code>breakpoint()</code> functions. Here's how to use them:
|
||||
h4 <code>out(<i>info</i>, <i>data</i>)</code> - 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 <i>send</i> any data to DevBug. Instead, it stores it to be sent.
|
||||
h4 <code>breakpoint(<i>continue = false</i>, <i>name = ""</i>)</code> - 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 <code>continue</code> parameter determines whether or not program execution continues, or if the Node.js exit method is called. The <code>name</code> parameter allows you to change the name of the breakpoint. This can be useful to help distinguish multiple breakpoints in the DevBug dashboard.
|
||||
pre#editor #{ devbug.code.node }
|
||||
|
||||
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);
|
@ -0,0 +1,17 @@
|
||||
extends ../template
|
||||
block content
|
||||
h3 DevBug supports the code behind the web.
|
||||
p To use the client, include the code snippet in your PHP application as early as you can. You'll need to go to the <code>breakpoint()</code> function and customize the DevBug server URL and project API key. It's best to do this in a global namespace. That way the functions defined by DevBug are available everywhere in your program. This gives you access to the global <code>out()</code> and <code>breakpoint()</code> functions. Here's how to use them:
|
||||
h4 <code>out(<i>info</i>, <i>data</i>)</code> - 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 <i>send</i> any data to DevBug. Instead, it stores it to be sent.
|
||||
h4 <code>breakpoint(<i>continue = false</i>, <i>name = ""</i>)</code> - 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 <code>continue</code> parameter determines whether or not program execution continues, or if the PHP exit method is called. The <code>name</code> parameter allows you to change the name of the breakpoint. This can be useful to help distinguish multiple breakpoints in the DevBug dashboard.
|
||||
pre#editor #{devbug.code.php}
|
||||
|
||||
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/php');
|
||||
editor.setOption('readOnly', true);
|
Loading…
Reference in new issue