MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Debugging

    Scheduled Pinned Locked Moved Development
    22 Posts 7 Posters 19.2k Views 6 Watching
    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.
    • KirAsh4K Offline
      KirAsh4 Moderator
      last edited by

      I suspect the answer is: go read the source code … but, what are you trying to do?

      A Life? Cool! Where can I download one of those from?

      1 Reply Last reply Reply Quote 0
      • E Offline
        Eunanibus Module Developer
        last edited by

        It’s my source code :laughing: - My object should have an available function to me, but it’s coming up function not found. I’m gonna keep digging! New module is on its way.

        1 Reply Last reply Reply Quote 0
        • KirAsh4K Offline
          KirAsh4 Moderator
          last edited by

          Theeeeen you’re not defining it as a function … ?

          A Life? Cool! Where can I download one of those from?

          1 Reply Last reply Reply Quote 0
          • A Offline
            alexyak
            last edited by

            You don’t have to run the the code in the electron every time. I would just run “node index” from the /serveronly folder and start the chrome with dev tools on my dev box. Also as dev tool Visual Studio Code is a very good one and runs on Windows, Linux and OS X. You could configure it to debug the node.js as well as the chrome client (via a plugin) locally or even have a remote debugging session.

            1 Reply Last reply Reply Quote 0
            • B Offline
              bobbob601
              last edited by bobbob601

              This post is deleted!
              1 Reply Last reply Reply Quote 0
              • B Offline
                BenRoe Module Developer
                last edited by

                I could not use Log.log('foobar'); in the node_helper.js and if i use console.log('foobar'); the log is shown in the CLI. Is there a solution to show it in the Browser Console?

                strawberry 3.141S 1 Reply Last reply Reply Quote 0
                • strawberry 3.141S Offline
                  strawberry 3.141 Project Sponsor Module Developer @BenRoe
                  last edited by

                  @BenRoe quote from the readme The Magic Mirror contains a convenience wrapper for logging. Currently, this logger is a simple proxy to the original console.log methods. But it might get additional features in the future. The Loggers is currently only available in the core module file (not in the node_helper). so everything you have experinced is as it should be

                  instead of logging in the node_helper directly you could send the string, objects, etc. to your module and use the logger there to view it in the browsers console

                  Please create a github issue if you need help, so I can keep track

                  S 1 Reply Last reply Reply Quote 2
                  • S Offline
                    Sputnik @strawberry 3.141
                    last edited by

                    @strawberry-3.141 I got the following error when I run pm2 log mm:

                    error: cannot open .git/FETCH_HEAD: Permission denied

                    strawberry 3.141S 1 Reply Last reply Reply Quote 0
                    • strawberry 3.141S Offline
                      strawberry 3.141 Project Sponsor Module Developer @Sputnik
                      last edited by

                      @Sputnik could be the updatenotification module, which is probably not able to read a modules git config. Did you download modules manually or did you use git clone?

                      Please create a github issue if you need help, so I can keep track

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 2 / 3
                      • First post
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy