> 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).

# 生产环境调试

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

当运行一个已经部署到 Decentraland 的场景时，你可以尝试一些方法来调试它。

## 部署前

### 预览

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

## 快速重新加载

如果你需要重新加载你所站立的场景，请在聊天中输入以下内容并按回车：

`/reload`

## 关于发布流水线

请记住，每次发布后，系统都会通过一个内部流程优化所有 3D 模型，之后才能渲染。通常只需几秒钟，但对于非常大的场景或服务器繁忙时可能会更久。在完成之前，系统会向玩家提供你场景的上一个版本。

你可以使用 [此工具](https://decentraland.github.io/opscli/)检查此流程当前针对你场景的状态。如果转换完成，资产的三种变体都应显示绿灯。

## 场景日志

在正常使用 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`
  * **Windows**: `"C:\Users\[YOUR-USER]\Downloads\Decentraland_windows64\Decentraland.exe" --position 0,0 --scene-console true`

{% hint style="info" %}
**💡 提示**：更改 **位置** 参数为你场景的坐标，以直接加载到你的场景中。
{% endhint %}

当使用 `scene-console`，你可以通过三种方式打开控制台：

* 点击 ![](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 整体的问题，请参阅 [报告错误](/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.
