Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Commit

Permalink
Simplify remote debugging
Browse files Browse the repository at this point in the history
As @iradul suggested, simplify resource loading in remote debug mode.
After this change we don't need remote_debugger_harness.html anymore.
And breakpoints will work now again.

Issue #12864
  • Loading branch information
vitallium committed Aug 6, 2015
1 parent 44e50f4 commit 8b79f62
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 24 deletions.
1 change: 0 additions & 1 deletion src/phantomjs.qrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<RCC>
<qresource prefix="/">
<file>remote_debugger_harness.html</file>
<file>phantomjs-icon.png</file>
<file>bootstrap.js</file>
<file>configurator.js</file>
Expand Down
20 changes: 0 additions & 20 deletions src/remote_debugger_harness.html

This file was deleted.

5 changes: 2 additions & 3 deletions src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,8 @@ bool loadJSForDebug(const QString& jsFilePath, const QString& jsFileLanguage, co
QString scriptPath = findScript(jsFilePath, libraryPath);
QString scriptBody = jsFromScriptFile(scriptPath, jsFileLanguage, jsFileEnc);

QString remoteDebuggerHarnessSrc = readResourceFileUtf8(":/remote_debugger_harness.html");
remoteDebuggerHarnessSrc = remoteDebuggerHarnessSrc.arg(scriptBody);
targetFrame->setHtml(remoteDebuggerHarnessSrc);
scriptBody = QString("function __run() {\n%1\n}").arg(scriptBody);
targetFrame->evaluateJavaScript(scriptBody);

if (autorun) {
targetFrame->evaluateJavaScript("__run()", QString());
Expand Down

0 comments on commit 8b79f62

Please sign in to comment.