title: How do I see the navigation history in vue-router?
body: <p>I have a vue.js application and I'd like to see the navigation history in vue-router. I have a beforeRouteLeave hook in my component and I put a breakpoint in there. It hits the breakpoint, and I type this.$router in the console. It outputs the $router object but I don't see an actual stack of urls representing the history of my navigation through the site.</p>
  
  <p>This is what I see:</p>
  
  <pre><code>currentRoute: (...)
  app: Vue {_uid: 3, _isVue: true, $options: {…}, _renderProxy: Proxy, _self: Vue, …}
  apps: [Vue]
  options: {mode: "history", linkActiveClass: "active", routes: Array(47), scrollBehavior: ƒ}
  beforeHooks: []
  resolveHooks: []
  afterHooks: [ƒ]
  matcher: {match: ƒ, addRoutes: ƒ}
  fallback: false
  mode: "history"
  history: HTML5History {router: VueRouter, base: "", current: {…}, pending: {…}, ready: true, …}
  __proto__: Object
  </code></pre>
  
  <p>(I could expand this but I think that would be too big.)</p>
  
  <p>Where is the actual navigation stack?</p>
  
  <p>If you want to know why I need to see the navigation stack, it's because, when I click the back button on the browser, I suspect that the navigation stack is being popped even though my beforeRouteLeave hook is called and I don't call next(). I bring up a popup in beforeRouteLeave with the options: "leave" or "stay". If the user clicks "stay", I stay on the page. It seems to do the trick (it doesn't navigate away from the current page), but then if I click refresh on the browser, it refreshes with the previous page. Or if I say "stay" once, then click the back button again and say "leave", I go two pages back.</p>
  
  <p>So I want to see what's going on with the navigation stack. Is it being popped regardless of whether next() is called in beforeRouteLeave, at least when I click the back button? Or is something else going on.</p>
  
  <p>Thanks.</p>