devtools icon indicating copy to clipboard operation
devtools copied to clipboard

Routing tab does not display a list of routes added via `addRoutes`

Open maxim-usikov opened this issue 6 years ago • 5 comments

Version

5.0.1

Browser and OS info

Chrome 72.0.3626.121 / macOS Mojave 10.14.3

Steps to reproduce

codesandbox.io

What is expected?

List of all routes in Routing tab (init routes and addRoutes())

What is actually happening?

List of routes added during initialization in option routes, without addRoutes()


Routing

maxim-usikov avatar Mar 26 '19 06:03 maxim-usikov

@Akryum I gues now it's not possible to implement? Because no way to see routes added via addRoutes().

Related issues: https://github.com/vuejs/vue-router/issues/1234 https://github.com/vuejs/vue-router/issues/1859 https://github.com/vuejs/vue-router/issues/1955 https://github.com/vuejs/vue-router/issues/2454 https://github.com/vuejs/vue-router/issues/2280

https://github.com/vuejs/vue-router/blob/dev/src/index.js#L210

maxim-usikov avatar Mar 26 '19 14:03 maxim-usikov

@posva Any insight on this?

Akryum avatar Mar 26 '19 18:03 Akryum

For the moment this is not possible. It's part of the dynamic routing. We will have to add a way to let devtools track them. We could do a temporal fix where dynamic routes are added to a private property in vue-router so devtools can show them

posva avatar Mar 26 '19 19:03 posva

We could do a temporal fix where dynamic routes are added to a private property in vue-router so devtools can show them

Does v5 have this fix? I'm using the latest devtools, but dynamic routes are not shown.

kingyue737 avatar Apr 21 '22 14:04 kingyue737

Our entire project works on adding routes via addRoutes. It isn't easy to debug without the support of debug tool. The only way to see newly added routes is to call router.getRoutes().

palashbhowmick avatar Jul 04 '22 13:07 palashbhowmick