Debugging Pinia in Devtools
Earlier in Chapter 3, Vite and Vue Devtools, you were introduced to Vue Devtools. Devtools are an incredibly powerful way to debug and optimize web applications, and the Vue plugin makes them even more vital for Vue developers. What makes Vue Devtools even more powerful is automatic recognition and support for applications using Pinia.
Let’s take a quick tour of what this support looks like by using the Color Preview application last modified in Exercise 10.03. Run the application from the command line, open the URL in your browser, and open your developer tools. Note the Pinia tab on the right in Figure 10.9:
Figure 10.9 – Pinia support in Vue Devtools
Right away, you can see you’ve got access to the complete state as well as any getters. If you start modifying the RGB values, you can see them immediately reflected:
Figure 10.10 – The state values update as the user...