Open History to see the last commit
1---
2id: withDevtools
3title: withDevtools
4---
5β
6# Function: withDevtools()
7β
8```ts
9function withDevtools(withDevtoolsFn?): DeveloperToolsFeature
10```
11β
12Enables developer tools.
13β
14**Example**
15β
16```ts
17export const appConfig: ApplicationConfig = {
18 providers: [provideTanStackQuery(new QueryClient(), withDevtools())],
19}
20```
21β
22By default the devtools will be loaded when Angular runs in development mode and rendered in `<body>`.
23β
24If you need more control over when devtools are loaded, you can use the `loadDevtools` option. This is particularly useful if you want to load devtools based on environment configurations. For instance, you might have a test environment running in production mode but still require devtools to be available.
25β
26If you need more control over where devtools are rendered, consider `injectDevtoolsPanel`. This allows rendering devtools inside your own devtools for example.
27β
28## Parameters
29β
30### withDevtoolsFn?
31β
32() => [`DevtoolsOptions`](../../interfaces/devtoolsoptions.md)
33β
34A function that returns `DevtoolsOptions`.
35β
36## Returns
37β
38[`DeveloperToolsFeature`](../../type-aliases/developertoolsfeature.md)
39β
40A set of providers for use with `provideTanStackQuery`.
41β
42## See
43β
44- [provideTanStackQuery](../providetanstackquery.md)
45- [DevtoolsOptions](../../interfaces/devtoolsoptions.md)
46β
47## Defined in
48β
49[providers.ts:262](https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/providers.ts#L262)