这是indexloc提供的服务,不要输入任何密码
Skip to content

Docs debug flags #229 #319

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 51 additions & 1 deletion docs/pages/docs/reference/command-line-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ turbo run build test lint --graph=my-graph.png
**Known Bug**: All possible pipeline task nodes will be added to the
graph at the moment, even if that pipeline task does not actually exist in a
given package. This has no impact on execution, it just means that:

- the terminal output may overstate the number of packages in which a task is running.
- your dot viz graph may contain additional nodes that represents tasks that do not exist.
</Callout>
Expand Down Expand Up @@ -264,6 +264,56 @@ turbo run build --team=my-team --token=xxxxxxxxxxxxxxxxx

You can also set the value of the current team by setting an environment variable named `TURBO_TEAM`. The flag will take precedence over the environment variable if both are present.

#### `--trace`

`type: string`

To view CPU trace, outputs the trace to the given file, use `go tool trace [file]`.

<Callout emoji="🚨">
**Important**: The trace viewer doesn't work under Windows Subsystem for Linux.
</Callout>

```sh
turbo run build --trace="<trace-file-name>"
```

#### `--heap`

`type: string`

To view heap trace, outputs the trace to the given file, use `go tool pprof [file]` and type `top`. You can also drop it into [speedscope](https://speedscope.app) and use the `left heavy` or `sandwich` view modes.

```sh
turbo run build --heap="<heap-file-name>"
```

#### `--cpuprofile`

`type: string`

To view CPU profile, outputs the profile to the given file, drop the file into [speedscope](https://speedscope.app).

<Callout emoji="🚨">
**Important**: The CPU profiler doesn't work under
Windows subsystem for Linux. The profiler has to be built
for native Windows and run using the command prompt instead.
</Callout>


```sh
turbo run build --cpuprofile="<cpu-profile-file-name>"
```
#### `-v`, `-vv`, `-vvv`

To sepecify log level, use `-v` for `Info`, `-vv` for `Debug` and `-vvv` for `Trace` flags.

```sh
turbo run build -v
turbo run build -vv
turbo run build -vvv
```

## `turbo prune --scope=<target>`

Generate a sparse/partial monorepo with a pruned lockfile for a target package.
Expand Down