Debugging the Javascript in the Qt Creator
-
wrote on 24 Jul 2012, 10:41 last edited by
I want to debug the javascript using the Qt creator in the Linux enviorment.
Kindly let me know how we can do that. -
wrote on 24 Jul 2012, 12:42 last edited by
JavaScipt in QML?
Just using
@
console.log(args)
//or ...
console.debug(args)
@Please, be more specific...
-
wrote on 25 Jul 2012, 08:47 last edited by
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> -
wrote on 25 Jul 2012, 09:25 last edited by
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
-
wrote on 25 Jul 2012, 09:35 last edited by
Sorry, but Qt Creator does not support debugging of javascript in web pages. Please use a browser for that.
4/5