Skip to content

Commit

Permalink
feat(doc): add doc about debug
Browse files Browse the repository at this point in the history
  • Loading branch information
joelwurtz committed Apr 2, 2024
1 parent f101496 commit e61cea7
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/_nav.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
- [Configuration](bundle/configuration.md)
- [Cache Warmup](bundle/cache-warmup.md)
- [Expression Language](bundle/expression-language.md)
- [Api Platform](bundle/api-platform.md)
- [Migrate existing application](bundle/migrate.md)
- [Debugging](bundle/debugging.md)
- [Upgrading to 9.0](upgrading-9.0.md)
- [Contributing](contributing.md)
25 changes: 25 additions & 0 deletions docs/bundle/debugging.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Debug a Mapper

AutoMapper provides 2 ways to debug what's going on with a mapper when using the Symfony bundle:

## The `debug:mapper` Command

The `debug:mapper` command will display the mapping information for a specific mapper.
This can be useful to understand how AutoMapper is mapping your objects and why some properties are not mapped.

```bash
php bin/console debug:mapper User UserDTO
```

![Profiler](../images/debug-cli.png)

## Using the symfony profiler

AutoMapper provides a panel in the Symfony profiler that will display the mapping information for each request.
Please note that this only display Mapper that has been generated during the request, if you have a mapper that was not
generated during the request it will not be displayed.

You can find the panel in the Symfony profiler under the `AutoMapper` tab.

![Profiler](../images/debug-profiler-1.png)
![Profiler](../images/debug-profiler-2.png)
2 changes: 2 additions & 0 deletions docs/bundle/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ features linked to Symfony way of doing things.
- [Configuration](configuration.md)
- [Cache Warmup](cache-warmup.md)
- [Expression Language](expression-language.md)
- [Api Platform](api-platform.md)
- [Migrate existing application](migrate.md)
- [Debugging](debugging.md)
Binary file added docs/images/debug-cli.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/debug-profiler-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/debug-profiler-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e61cea7

Please sign in to comment.