Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Debugging the Javascript in the Qt Creator

Debugging the Javascript in the Qt Creator

Scheduled Pinned Locked Moved Qt Creator and other tools
5 Posts 3 Posters 5.7k Views
  • 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.
  • A Offline
    A Offline
    acy062
    wrote on 24 Jul 2012, 10:41 last edited by
    #1

    I want to debug the javascript using the Qt creator in the Linux enviorment.
    Kindly let me know how we can do that.

    1 Reply Last reply
    0
    • P Offline
      P Offline
      Peppy
      wrote on 24 Jul 2012, 12:42 last edited by
      #2

      JavaScipt in QML?
      Just using
      @
      console.log(args)
      //or ...
      console.debug(args)
      @

      Please, be more specific...

      1 Reply Last reply
      0
      • A Offline
        A Offline
        acy062
        wrote on 25 Jul 2012, 08:47 last edited by
        #3

        I have following program to debug (HTML and Javascript).
        In the following program, I want to stop the debugger, at <button type="button" >Display Date</button> and check the variable, I am not able to stop the instruction at that point.

        <!DOCTYPE html>
        <html>
        <head>
        [removed]
        function displayDate()
        {
        document.getElementById("demo")[removed]=Date();
        }
        [removed]
        </head>
        <body>

        <h1>My First Web Page</h1>
        <p id="demo">This is a paragraph.</p>

        <button type="button" >Display Date</button>

        </body>
        </html>

        1 Reply Last reply
        0
        • P Offline
          P Offline
          Peppy
          wrote on 25 Jul 2012, 09:25 last edited by
          #4

          the debugger?? I am not sure which "debugger" do you mean. However, if you want to have output from WebKit core (as a Javascript parser) you have to handle @QWebPage::javaScriptConsoleMessage(...);@

          http://qt-project.org/doc/qt-4.8/qwebpage.html#javaScriptConsoleMessage

          1 Reply Last reply
          0
          • T Offline
            T Offline
            tobias.hunger
            wrote on 25 Jul 2012, 09:35 last edited by
            #5

            Sorry, but Qt Creator does not support debugging of javascript in web pages. Please use a browser for that.

            1 Reply Last reply
            0

            4/5

            25 Jul 2012, 09:25

            • Login

            • Login or register to search.
            4 out of 5
            • First post
              4/5
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved