> For AI agents: the complete documentation index is available at /zh/llms.txt, the full documentation bundle is available at /zh/llms-full.txt.

# printConsoleTrace

- **类型：** `boolean`
- **默认值：** `false`
- **CLI：** `--printConsoleTrace`

console 方法调用时始终打印调用栈，这将有助于调试。


**CLI**

```bash
npx rstest --printConsoleTrace
```


**rstest.config.ts**

```ts
import { defineConfig } from '@rstest/core';

export default defineConfig({
  printConsoleTrace: true,
});
```


:::note
当 [disableConsoleIntercept](/zh/config/test/disable-console-intercept.md) 为 `true` 时，`printConsoleTrace` 将不会生效。
:::
