> For the complete documentation index, see [llms.txt](https://docs.decentraland.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/tiao-shi/debug-in-prod.md). Agents can also search and read this documentation through its [MCP server](https://docs.decentraland.org/~gitbook/mcp).

# 生产环境调试

如何调试运行在 Decentraland 内的场景

运行已部署到 Decentraland 土地上的场景时，可以尝试几种方法来调试。

## 部署前

### 预览

将场景部署到 Decentraland 之前，请确保使用最新版本的 Decentraland SDK 在预览中运行正常。请参阅 [在预览中调试](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/tiao-shi/debug-in-preview.md).

## 快速重新加载

如果需要重新加载当前所在的场景，请在聊天中输入以下内容并按 Enter：

`/reload`

## 关于发布流程

请注意，每次发布后，系统都会通过内部流程优化所有 3D 模型，然后才能进行渲染。这通常只需几秒钟，但对于非常大的场景，或服务器繁忙时，可能需要更长时间。在优化完成之前，玩家看到的仍是场景的上一版本。

你可以使用 [此工具](https://decentraland.github.io/opscli/)查看场景当前的处理状态。如果转换已完成，所有三种资产变体旁都应显示绿色指示灯。

## 多人游戏服务器日志和指标

对于已部署的 [多人游戏服务器](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/lian-wang/authoritative-servers.md) 场景，请使用 [场景洞察](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/tiao-shi/scene-insights.md) 搜索过去 7 天的服务器日志、实时跟踪新增日志行，并查看 CPU 和内存指标。它还包含钱包登录信息，以及你或 AI 助手可以从场景项目中运行的命令。

## 场景日志

正常使用 Decentraland 时，无法打开控制台查看调试消息。若要启用控制台，必须使用 `scene-console` 参数打开 Decentraland。之后，按键盘上的反引号键即可切换控制台： **\`**。在大多数英文键盘上，此键位于数字 1 键的左侧。

若要使用 `scene-console` 参数打开 Decentraland，可以选择以下任一方式：

* 在浏览器窗口中输入以下深层链接： `decentraland://?position=0,0&scene-console=true`。如果已安装 Decentraland 桌面应用，此操作会将其打开。
* 在命令行中输入以下内容：
  * **macOS**: `open Decentraland.app --args --position 0,0 --scene-console true`
  * **winOS**: `"C:\Users\[YOUR-USER]\Downloads\Decentraland_windows64\Decentraland.exe" --position 0,0 --scene-console true`

{% hint style="info" %}
**💡 提示**：将 **position** 参数改为场景的坐标，即可直接加载进入场景。
{% endhint %}

使用 `scene-console`运行 Decentraland 时，可以通过以下三种方式打开控制台：

* 点击右上角的 ![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-a673f6b987216e9e471fdac882879c44fcf94652%2Fconsole-icon.png?alt=media\&token=1965a51b-d4b0-4caa-b9d5-d24d738c1fb8) 图标
* 按 **\`** 键打开简易控制台
* 按 Shift + **\`** 打开较大的控制台视图

请注意，所有当前活动场景的消息都会记录到控制台中，因此你在控制台中看到的某些内容可能与自己的场景无关。

## 报告错误

如果遇到的问题并非出在你的场景，而是与 Decentraland SDK 本身有关，请参阅 [报告错误](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/tiao-shi/report-bug.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.decentraland.org/creator/content-creator-zh/chang-jing-sdk7/tiao-shi/debug-in-prod.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
