devbug/app/views/dash_v1/code.pug

26 lines
1.1 KiB
Plaintext
Raw Normal View History

2019-06-23 17:17:35 +00:00
extends ./template
block content
p
| These code snippets are designed to be included in-line. You can store outputs using the
code out()
| function. Then, call the
code breakpoint()
2019-06-24 18:00:36 +00:00
| function to send those outputs to DevBug. Currently, there are official clients for Node.js, PHP, and Javascript (Web). However, the clients make use of a generic exposed API endpoint which you can use from anywhere.
2019-06-24 14:35:49 +00:00
h2 Node.js
p To use DevBug in a Node.js app, install the "devbugjs" NPM package. Then, to initialize DevBug, use the following code snippet at any point in the application:
pre
code #{devbug.code.node}
h2 PHP
2019-06-23 17:17:35 +00:00
p
| You'll need to ensure that the DevBug server URL and Project API Key are correct. These are local variables in the
2019-06-24 14:35:49 +00:00
code breakpoint()
2019-06-23 17:17:35 +00:00
| function.
pre
code #{devbug.code.php}
h2
a(href="/assets/agents/web.js" target="_blank") JavaScript (Web)
2019-06-24 18:00:36 +00:00
h2 Using the API
p You can post output to DevBug projects from anywhere using the DevBug API. Here's how:
pre
code #{devbug.code.api}