Tabnine Logo For Javascript
debug
Code IndexAdd Tabnine to your IDE (free)

How to use debug

Best JavaScript code snippets using debug(Showing top 15 results out of 4,167)

origin: airtap/airtap

_open (callback) {
  this[kServer].listen(0, () => {
   debug('active on port %o', this.port)
   callback()
  })
 }
origin: eggjs/egg

/**
  * send message to app
  * @param {String} action - message key
  * @param {Object} data - message value
  * @return {Messenger} this
  */
 sendToApp(action, data) {
  debug('[%s] send %s with %j to all app', this.pid, action, data);
  this.send(action, data, 'app');
  return this;
 }
origin: GoogleChromeLabs/ndb

/**
  * @param {string} message
  */
 _messageReceived(message) {
  if (this._handler) {
   protocolDebug('<', message);
   this._handler.dispatchMessage(message);
  }
 }
origin: remoteinterview/zero

_onRemove(filePath) {
  filePath = slash(filePath);
  const relativePath = path.relative(this.sourcePath, filePath);
  if (
   relativePath.indexOf("node_modules") !== -1 ||
   relativePath.indexOf("zero-builds") !== -1
  ) {
   return;
  }
  debug("[REM]".yellow, filePath);
  if (this.isWatching) this._emitFileChange("remove", filePath);
 }
origin: withspectrum/spectrum

const sendWebPushNotification = (
 subscription: any,
 payload: Object | string,
 options?: ?Object
): Promise<?Object> => {
 return sendWebPush(subscription, payload, options).catch(err => {
  if (err.statusCode === 410 && err.endpoint) {
   debug(`old subscription found (${err.endpoint}), removing`, err);
   return removeSubscription(err.endpoint);
  }
 });
}
origin: eggjs/egg

_onMessage(message) {
  if (message && is.string(message.action)) {
   debug('[%s] got message %s with %j, receiverPid: %s',
    this.pid, message.action, message.data, message.receiverPid);
   this.emit(message.action, message.data);
  }
 }
origin: GoogleChromeLabs/ndb

/**
  * @param {string} message
  */
 send(message) {
  if (this._ws.readyState === WebSocket.OPEN) {
   protocolDebug('>', message);
   this._ws.send(message);
  }
 }
origin: withspectrum/spectrum

const createPayload = (type: EntityTypes, data: Object): Object =>
 debug(`create payload for ${type.toLowerCase()}#${data.id}`) || {
  type,
  id: data.id,
  payload: JSON.stringify(data),
 }
origin: esbenp/pdf-bot

function _markAsCompleted (db, id) {
 var completed_at = utils.getCurrentDateTimeAsString()

 debug('Marking job ID %s as completed at %s', id, completed_at)

 return db.markAsCompleted(id)
}
origin: withspectrum/spectrum

const removeSubscription = (endpoint: string) => {
 debug(`remove subscription ${endpoint}`);
 return db
  .table('webPushSubscriptions')
  .getAll(endpoint, { index: 'endpoint' })
  .delete()
  .run();
}
origin: airtap/airtap

_destroy (reason, cb) {
  if (reason) debug('destroy %o: %O', this[kTitle], reason)
  clearTimeout(this[kIdleTimer])
  this[kParser].destroy()
  cb(reason)
 }
origin: airtap/airtap

_open (callback) {
  this[kServer] = this[kApp].listen(0, () => {
   debug('active on port %o', this.port)
   callback()
  })

  enableDestroy(this[kServer])
 }
origin: eggjs/egg

/**
  * send message to agent
  * @param {String} action - message key
  * @param {Object} data - message value
  * @return {Messenger} this
  */
 sendToAgent(action, data) {
  debug('[%s] send %s with %j to all agent', this.pid, action, data);
  this.send(action, data, 'agent');
  return this;
 }
origin: eggjs/egg

/**
  * Send message to all agent and app
  * @param {String} action - message key
  * @param {Object} data - message value
  * @return {Messenger} this
  */
 broadcast(action, data) {
  debug('[%s] broadcast %s with %j', this.pid, action, data);
  this.send(action, data, 'both');
  return this;
 }
origin: eggjs/egg

/**
  * send message to app
  * @param {String} action - message key
  * @param {Object} data - message value
  * @return {Messenger} this
  */
 sendToApp(action, data) {
  debug('[%s] send %s with %j to all app', this.pid, action, data);
  this.send(action, data, 'application');
  return this;
 }
debug(npm)

JSDoc

small debugging utility

Most used debug functions

  • debug
  • log
  • error
  • Debugger.enabled
  • logger
  • Debug,
  • _debug,
  • debugError,
  • debugLog,
  • warning,
  • DEBUG,
  • Debugger.apply,
  • Debugger.error,
  • Debugger.include,
  • Debugger.requestCounter,
  • Debugger.reroute,
  • Debugger.validationError,
  • dbg,
  • fine

Popular in JavaScript

  • aws-sdk
    AWS SDK for JavaScript
  • moment
    Parse, validate, manipulate, and display dates
  • handlebars
    Handlebars provides the power necessary to let you build semantic templates effectively with no frustration
  • qs
    A querystring parser that supports nesting and arrays, with a depth limit
  • colors
    get colors in your node.js console
  • chalk
    Terminal string styling done right
  • ws
    Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js
  • lodash
    Lodash modular utilities.
  • crypto
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJavascript Code Index
Get Tabnine for your IDE now