Debugging

First work out whether the new revision failed to deploy or the active revision failed while handling a Discord event. Weeble reports both in the Weeble output channel.

Open the logs

Open the Weeble sidebar, expand the deployment, and select Runtime Logs. The extension loads recent entries and checks for new ones about every five seconds.

The output channel contains two kinds of entries:

  • Deployment output follows a revision through build, publish, and activation.

  • Runtime logs contain console output and uncaught errors from the active revision.

A deployment failed

Read the last Deployment failed entry first. Build errors also appear on the relevant editor file when Weeble can identify one.

If build or publish fails, the new revision never becomes active. If activation fails, the previous active revision keeps receiving events. Fix the reported error and deploy again.

A command does not respond

Check these in order:

  1. The deployment is enabled and the expected revision is active.

  2. The runtime logs show the command or event reaching that revision.

  3. The bot can view the channel, send messages, and use any other permissions the command requires.

  4. The bot has the Discord intents required by the command. Prefix commands need access to message content.

  5. The handler is registered at the top level rather than inside another handler or delayed callback.

For an application command, redeploy after changing its name, description, or options so Weeble can update the registration.

An event handler never runs

Confirm that the handler uses the intended event constant and that Discord sends that event under the bot’s configured intents. Member, presence, and message-content data have additional intent requirements.

If the same bot has several deployments, check the active revision for the deployment that registered the handler. Each deployment has its own logs.

A handler failed

An uncaught runtime error records the event, revision, error type, message, and a mapped stack trace when source maps are available.

Start with the first stack frame in your project, then check for:

  • Missing fields or invalid SDK arguments

  • Discord permission failures

  • Rejected network requests

  • A runtime budget or response-size limit

See Limits for the current execution budgets.

Catch an error only when the handler can recover or add useful context. Otherwise, let Weeble record the original error and stack trace.

Leave useful evidence

Log identifiers and state that explain what the handler was attempting:

console.log("Scheduling reminder", {
  userId: message.author?.id,
  runAt: runAt.toISOString(),
});

Use console.warn when execution can continue and console.error when you handled a failed operation but still need it recorded.

Important

Never log bot tokens, API keys, webhook URLs, authorization headers, or complete third-party responses that may contain credentials.

When asking for help, include the deployment name, revision number, approximate time, and exact error. Remove credentials and unrelated user data first.