LogoLogo
HomePlatform IntegrationsDownloadsLogin
  • Welcome
  • ๐Ÿ“ŒIntroduction
    • Getting Started
      • Signing Up
      • Creating a Database
      • Platform Integrations
        • ๐Ÿ’ปDesktop
          • BugSplat Crash Reporting Library for Windows (Native C++)
            • Full Memory Dumps
            • Windows (Native C++) Dependencies
          • Windows (.NET Framework)
          • macOS
          • Linux
        • ๐Ÿ”€Cross-Platform
          • .NET Standard
          • Breakpad (Deprecated)
          • Crashpad
            • How to Build Google Crashpad
          • Deno
          • Electron
          • Java
          • Node.js
          • Python
          • Qt
        • ๐ŸŽฎGame Development
          • CRYENGINE
          • Nintendo Switch
          • PlayStation
          • Unreal Engine
            • Unreal Engine Plugin
          • Unity
          • Xbox
        • ๐Ÿ“ฑMobile
          • Android
          • Ionic
          • iOS
          • React Native
        • ๐Ÿ•ธ๏ธWeb
          • Angular
          • JavaScript
          • React
          • Vue
        • โŒ›Downloads
      • Platform Samples
        • BugSplatTester (iOS)
        • BugSplatTester (macOS)
        • myConsoleCrasher (C++)
          • Address Sanitizer Reports
        • my-android-crasher
        • my-angular-crasher
        • my-electron-crasher
        • my-java-crasher
        • my-node-crasher
        • my-qt-crasher
        • my-react-crasher
        • my-unity-crasher
        • my-unreal-crasher
      • Inviting Team Members
      • Importing Crashes
      • Troubleshooting
      • Quickly Submitting Your First Crash in Under 5 Minutes
    • Development
      • Using the App
      • Symbol Files
        • Common Symbols
        • How to Manually Upload Symbols
        • Source Maps
        • Symbol Servers
        • Working with Symbol Files in Windows Environments
      • Searching
        • Table Filtering
        • Table Grouping
      • Grouping Crashes
      • Commenting
      • Integrations and Third Party Tools
        • Configurable Alerts
          • Slack
          • Microsoft Teams
          • Discord
          • Email
          • Webhook
        • Issue Trackers
          • Azure DevOps
          • Favro
          • Jira
          • GitHub Issues
          • GitLab
          • Monday.com
          • YouTrack
          • Auto-Creating Defects from BugSplat Databases in Attached Third-Party Issue Trackers
      • API
        • Web Application Endpoints
          • Charting
          • Company
          • Crash
          • Crashes
          • Crash Groups
          • Databases
          • Defect
          • Events
          • Import/Migrate
          • Support Response
          • User (GDPR)
          • Users
          • Versions
        • Crash Post Endpoints
        • OAuth2
        • Defect Tracker Options
        • Paging, Filtering, and Grouping
        • Platform Specific API's
          • C++ Native API
          • .NET API
    • Production
      • Versions
      • ๐Ÿ†•Regression Alerts
      • Security and Compliance
        • Security Program
        • BugSplat Security Program Inquirys
        • SOC 2
        • GDPR & UK GDPR Compliance
        • Avoid Collecting Personally Identifiable Information (PII)
        • Crash Expiry
        • Terms
        • Privacy Policy
      • Support Responses
      • BugSplat Status
  • ๐ŸŽEducation
    • BugSplat Terminology
    • How-Tos
      • Creating Defects
      • Contacting End-Users
      • Crash Dialog Branding
      • Reprocess Crashes
      • Batch Reprocess Crashes
      • Using the Crash Attribute Feature
      • Send Feedback
      • Remove Crashes
    • Videos
      • BugSplat Product Walkthrough
    • FAQs
      • How Do I Upload Crashes with Python?
      • How Do I Remove Symbol Files?
      • Crash details 'Active Thread'
      • How long does it take to process a crash?
      • How BugSplat handles large crash volumes
      • How Does Crash Rate Limiting Work?
      • Add Custom Branding to Support Response
      • Finding Missing Reports
      • Using Dark Mode
      • What If My App or Game Grows Quickly?
      • Does BugSplat have an effect on application performance?
      • Manually Upload Crash Reports to BugSplat
      • How to configure proxy settings in BugSplat
      • Using BugSplat's public database
      • How to Upload Symbol Files with Symbol-Upload
      • Using SendPdbs to Automatically Upload Symbol Files
      • Managing Symbol Space
      • Why Group Crashes?
      • Uploading third-party DLLs without PDB files
      • Localized Support Responses for Windows C++, .NET, and macOS
      • BugSplat application uptime data
        • What are the upload size considerations with BugSplat accounts.
      • Is an application's source code safe when using BugSplat?
      • How to get correct callstacks with BugSplat in Steam
      • What is a crash reporter?
      • Common End-User Questions
        • Missing BugSplat.dll
        • What should I do if I get a BugSplat?
        • What is BsSndRpt.exe?
        • My software just crashed. Should I contact BugSplat for help?
  • ๐ŸขAdministration
    • Billing
      • Free Trial Overview
      • Plans and Billing Overview
      • How to Sign Up for a BugSplat Plan
      • Viewing Account Usage
      • Upgrading, Changing, or Canceling Your Plan
        • Upgrading or Downgrading Your Plan
        • Adding Additional Crashes and Storage Space
        • Updating Credit Card and Billing Information and Viewing Billing History
        • Updating Tax and VAT Information
        • Canceling Your Plan
      • Free and Discounted Plans
        • Free Plan Overview
        • Free Crash Reporting for Indie Game Development
        • Education
        • Open-Source
        • Good Causes
      • Plans, Upgrades, and Payments FAQ
        • Fair-Refund Policy
        • Update to Our Legacy Plans Guide
        • Updates to BugSplat Pricing Plans - March 2024
        • Using Coupons and Promotions at BugSplat
        • What is 'High Volume Fractional Crash Processing'?
    • Account
      • Migrating Databases
      • Deleting Databases
      • Deleting a Company Account
      • Changing Company Name
    • User Management
      • User Permissions
      • Deleting a User
      • Requesting Access
      • Login Page and Options
      • Password Settings and Reset Options
        • Required Password Reset - August 4th, 2023
      • Single Sign-On (SSO)
      • Multi-Factor Authentication (MFA)
      • Enforce MFA
      • Adding New Users in Companies with Multiple Databases
    • Contact us
  • ๐Ÿ›About
    • What is BugSplat?
    • Why BugSplat?
    • Who is BugSplat?
      • Our Values
      • Charitable Giving
      • Brand Guidelines
    • Partnerships
    • Misc
      • Promotions
        • March 2024 - Game Developer Free Months of Service
      • Giveaways
        • April 8 - April 22, 2025
        • Feb 18 - March 17, 2025
        • Jan 15 - Feb 13, 2025
        • December 19-29, 2024
        • November 21โ€“28, 2024
        • October 17-24th, 2024
        • September 19-26th, 2024
        • July 18 - July 23, 2024
        • April 18 - May 12, 2024
        • March 18 - April 03, 2024
        • November 15-30, 2023
        • October 9-23, 2023
  • ๐Ÿ”€Changelog
    • Changelog
Powered by GitBook
On this page
  • ๐Ÿ‘€ Getting Started
  • โš™๏ธ Integrating
  • ๐Ÿงช Sample
  • ๐Ÿ“ˆ Viewing Reports
  • ๐Ÿงฉ API
  • ๐Ÿค Contributing

Was this helpful?

  1. Introduction
  2. Getting Started
  3. Platform Integrations
  4. Cross-Platform

Deno

PreviousHow to Build Google CrashpadNextElectron

Last updated 1 year ago

Was this helpful?

๐Ÿ‘€ Getting Started

Adding BugSplat error reporting to your application, web worker, or serverless function only takes a few lines of code. Once integrated, BugSplat will capture stack traces, logs, and other valuable insight when your code encounters a problem. BugSplat's package is fully typed and easily imported via .

โš™๏ธ Integrating

Add an import from via :

import { BugSplat } from 'https://esm.sh/bugsplat@8.0.1';

Create a new instance of the BugSplat class with the name of your BugSplat database, the name of your application, and the version of your application:

const bugsplat = new BugSplat('DatabaseName', 'AppName', '1.0.0');

Use the bugsplat instance to capture errors that originate inside of try-catch blocks:

try {
  throw new Error("BugSplat");
} catch (error) {
  await bugsplat.post(error);
}

Use bugsplat to post errors from promise rejections:

Promise.reject(new Error("BugSplat!")).catch(error => bugsplat.post(error, {}));

You can also attach a file to your error post by passing a BugSplatOptions object containing with a value for additionalFormDataParams property.

await bugsplat.post(error, getAdditionalOptionsWithLogFile());

function getAdditionalOptionsWithLogFile() {
  const filename = 'log.txt';
  return {
    additionalFormDataParams: [{
      key: 'file',
      value: new File([Deno.readFileSync(filename)], filename),
      filename: filename,
    }],
  };
}

๐Ÿงช Sample

git clone https://github.com/BugSplat-Git/my-deno-crasher

Set your current directory to my-deno-crasher.

cd my-deno-crasher

Run the sample with the --allow-net and --allow-read flags to allow BugSplat to post an error to our backend and read the log file respectively.

deno run --allow-net --allow-read main.ts

๐Ÿ“ˆ Viewing Reports

Thatโ€™s it! Your application is now configured to post error reports to BugSplat.

๐Ÿงฉ API

In addition to the configuration demonstrated above, there are a few public methods that can be used to customize your BugSplat integration:

bugsplat.setDefaultAppKey(appKey); // Additional metadata that can be queried via BugSplats web application
bugsplat.setDefaultUser(user); // The name or id of your user
bugsplat.setDefaultEmail(email); // The email of your user
bugsplat.setDefaultDescription(description); // Additional info about your crash that gets reset after every post
async bugsplat.post(error, options); // Posts an arbitrary Error object to BugSplat
// If the values options.appKey, options.user, options.email, options.description are set the corresponding default values will be overwritten
// Returns a promise that resolves with properties: error (if there was an error posting to BugSplat), response (the response from the BugSplat crash post API), and original (the error passed by bugsplat.post)

๐Ÿค Contributing

Clone the repository:

After posting an error, navigate to the page. You should see a new crash report for the application you just configured. Click the link in the ID column to see details about your crash on the page:

BugSplat loves open-source software! Please check out our project on and send us a Pull Request.

๐Ÿ“Œ
๐Ÿ”€
Deno
bugsplat-js
esm.sh
bugsplat-js
esm.sh
my-deno-crasher
Crashes
Crashes
GitHub
Deno Error Reports
Deno Error Report