Debugging the Javascript in the Qt Creator
-
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> -
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
-
Sorry, but Qt Creator does not support debugging of javascript in web pages. Please use a browser for that.