No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    There is no component source code to debug in Chrome devTools

    Framework
    2
    5
    691
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      kiril4913 last edited by kiril4913

      I faced to very strange issue… and have no idea how to solve it.

      I create my custom component:

      <template>
       <q-list
         no-border    link  inset-delimiter  separator>
      <q-item @click.native="selectRouteChipByNotAutocomplete(routeItem)" v-for="routeItem in routeTabItems" :key="routeItem" >
        <q-item-side icon="info" />
          <q-item-main>
             {{routeItem}}
          </q-item-main>
        </q-item>
       </q-list>
      </template>
      
      <script>
      export default {
          name: "routeCollapsibleList",
          data(){
            return{
              routeTabItems:[],
            }
          },
          mounted(){},
          methods:{
            selectRouteChipByNotAutocomplete(routeChip){},
            initRouteTabItems(timerID){},
          },
      }
      </script>
      <style scoped>
      </style>
      

      And render it in another one:

      <template>
         <route-collapsible-list></route-collapsible-list>
         <trans-modal></trans-modal>
      </template>
      <script>
         import transModal from "../components/transModal";
         import routeCollapsibleList from "../components/routeCollapsibleList";
      
         export default {
           name: 'LayoutDefault',
           components: {
             transModal,
             routeCollapsibleList,
           },
           data() { },
           mounted(){ },
           methods: { }
         }
      

      So the weird thing is that it renders everything ok in DOM but there is no sources for routeCollapsibleList in “quasar dev” mode and at the same time I can see the component in Chrome’s devTool in Vue tab… Also it loads sources for transModal and LayoutDefault components and I can put the breakpoints to debug… But it doesn’t load the routeCollapsibleList component’s source code, there is no just such file in source tab and in the dropdown list of code files…

      Is this some kind of babel or webpack building issue? How to solve this and load the propper component code for debug?

      1 Reply Last reply Reply Quote 0
      • G
        genyded last edited by

        We’ve run into similar issues a couple of times and either building the app (so that it gets put into dist) - no idea why this works. And/or making sure the env is set to ‘development’ (specifically webpacks NODE_ENV which should be derives from Quasars settings.

        K 1 Reply Last reply Reply Quote 0
        • K
          kiril4913 @genyded last edited by

          @genyded
          please, can you write the steps for your solution with the paths of the files wich has to be editted?

          1 Reply Last reply Reply Quote 0
          • G
            genyded last edited by genyded

            Seriously???

            1. Run quasar build from a console prompt while in your project directory
            2. Make sure nothing in your quasar.conf.js file sets env to production and that you do not have a .env file in your project root or if you do, that is does not set env to production

            This is JS project 101 stuff. I cannot guarantee it will work for you - but if not, it’s likely something along those same lines. You’ll just have to play around a bit until you figure it out.

            K 1 Reply Last reply Reply Quote 0
            • K
              kiril4913 @genyded last edited by

              @genyded,
              so I’ve found out the reason of the issue. It happens because it loads the component dynamically when the propper tab-pane is opened. So if I set the v-once directive to the component it loads the source code from the beginnind and I can debug it.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post