के साथ स्थापित रिमोट डीबगिंग प्राप्त करना मैं बिना भाग्य के, फैंटॉमजेएस के साथ रिमोट डीबगिंग सेट अप करने का प्रयास कर रहा हूं। मैं https://github.com/ariya/phantomjs/wiki/Troubleshooting पर निर्देशों का पालन कर रहा हूं।फ़ैंटॉमजेएस
var system = require('system'), fs = require('fs'), webpage = require('webpage');
(function(phantom){
var page=webpage.create();
function debugPage(){
console.log("Refresh a second debugger-port page and open a second webkit inspector for the target page.");
console.log("Letting this page continue will then trigger a break in the target page.");
debugger; // pause here in first web browser tab for steps 5 & 6
page.open(system.args[1]);
page.evaluateAsync(function() {
debugger; // step 7 will wait here in the second web browser tab
});
}
debugPage();
}(phantom));
अब मैं कमांड लाइन से इस चलाएँ::
$ phantomjs --remote-debugger-port=9001 --remote-debugger-autorun=yes debug.js my.xhtml
console.log
संदेश अब खोल विंडो में प्रदर्शित होते मैं एक छोटे से debug.js
नामित कार्यक्रम है। मैं एक ब्राउज़र पेज localhost:9001
पर खोलता हूं। यह इस बिंदु पर है कि दस्तावेज कहता है "प्रेत संदर्भ के लिए पहला वेब इंस्पेक्टर प्राप्त करें" हालांकि, मुझे about:blank
के लिए केवल एक ही प्रविष्टि दिखाई देती है। जब मैं उस पर क्लिक करता हूं, तो मुझे यूआरएल http://localhost:9001/webkit/inspector/inspector.html?page=1
के साथ, रिक्त पृष्ठ के बारे में अप्रासंगिक के लिए एक इंस्पेक्टर मिलता है। प्रलेखन __run()
निष्पादित करने के बारे में वार्तालाप करता है, लेकिन मुझे उस पृष्ठ पर नहीं लग रहा है जहां मैं ऐसा करूँगा; about:html
एक __run()
contिना लगता है जो एक नो-ऑप है।
एफडब्ल्यूआईडब्ल्यू, मैं W8 के तहत फैंटॉमजेएस 1.9.1 का उपयोग कर रहा हूं।
मुझे क्या याद आ रही है?
मैं उपयोग [इस] (http://blog.trackets.com/2014/05/17/ssh-tunnel-local-and-remote-port-forwarding-explained-with-examples। एचटीएमएल) को स्थानीय पोर्ट को दूरस्थ वेबसर्वर पोर्ट पर अग्रेषित करने के लिए। –