@@ -6,21 +6,13 @@ How to Visualize And Debug Routes
66
77While adding and customizing routes, it's helpful to be able to visualize
88and get detailed information about your routes. A great way to see every
9- route in your application is via the ``debug:router `` console command. Execute
10- the command by running the following from the root of your project.
9+ route in your application is via the ``debug:router `` console command, which
10+ lists * all * the configured routes in your application:
1111
1212.. code-block :: terminal
1313
1414 $ php app/console debug:router
1515
16- .. versionadded :: 2.6
17- Prior to Symfony 2.6, this command was called ``router:debug ``.
18-
19- This command will print a helpful list of *all * the configured routes in
20- your application:
21-
22- .. code-block :: text
23-
2416 homepage ANY /
2517 contact GET /contact
2618 contact_process POST /contact
@@ -29,21 +21,18 @@ your application:
2921 blog_show ANY /blog/{slug}
3022
3123 You can also get very specific information on a single route by including
32- the route name after the command:
24+ the route name as the command argument :
3325
3426.. code-block :: terminal
3527
3628 $ php app/console debug:router article_show
3729
38- Likewise, if you want to test whether a URL matches a given route, you can
39- use the ``router:match `` console command:
30+ Likewise, if you want to test whether a URL matches a given route, use the
31+ ``router:match `` command. This is useful to debug routing issues and find out
32+ which route is associated with the given URL:
4033
4134.. code-block :: terminal
4235
4336 $ php app/console router:match /blog/my-latest-post
4437
45- This command will print which route the URL matches.
46-
47- .. code-block :: text
48-
4938 Route "blog_show" matches
0 commit comments