Eclipse Neon - Javascript Console Output not showing - javascript

I'm developing a PHP project which utilizes Javascript with jquery for a number of functions (particularly authentication/api calls). The long and short of my problem is that I cannot get Javascript console logs to appear in the eclipse console. At all.
Not only this, but some of my functions work...sometimes. I'm trying to debug the cause of this, but without any form of logging occurring, it's extremely difficult.
How do I configure my Eclipse Neon PHP project to output Javascript console logs?
Edit: The project is a PHP Web Application. I'm currently running a local PHP server for the project via the php command php -S localhost:8000

The JavaScript built-in function console.log(message); logs the given message to the console in the browser window, which is accessible via the developer tools of your browser.
If you open your webapp via the built-in Eclipse browser, you do not have access to those tools, just because Eclipse is using a closed, minified browser (just like the browser widget for QT or Visual C# WinForms or even a distributed Electron app).
Using the Eclipse browser is not really helpful when trying to debug webapps, because you can't even see loading times of the pages and so on.

Related

Javascript shell command execution from Firefox web extensions

It's been noticed by all web extension developers that Firefox is going to stop SDK support (API that allows shell execution in client side) and will only accept web extensions.
Due to above-mentioned changes, I'm trying to get a shell command executed by javascript code in Firefox's web extensions' API.
I'm dealing with a web page that executes the web extension (I solved it by using javascript events), but the real trouble is that I need to execute a shell command in the javascript main code to open client programs such as LibreOffice or a background Java code and I don't know how to achieve it.
It's also necessary to execute these shell commands on Windows, OSX and Linux.
You can't directly run a shell command but native messaging lets you exchange messages with a specific native application that could launch other applications on your extension's behalf:
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Native_messaging

Automating web application with heavy JS with PhantomJS + Selenium WebDriver

I am automating one web application which contains very heavy javascript file. I am using PhantomJS and selenium webdriver with java for automation.
When the browser launch then on console a lot of errors shown for failure of javascripts used by that application.
And failure of these javascript impacts on the functionality of application.
Anyone faced this problem, give me some appropriate solution.

QtWebKit or Server side? Can't translate xml: ReferenceError: Can't find variable: XSLTProcessor

I need to open a webpage inside a QWebView in my Qt Widgets Application.
The web works fine, except one part, where some files are not downloading from the server.
I inspected the QWebView and I found that error in the title...
It seems weird, because I tried to compile my app in linux with same Qt version and it works fine, no error in Web Inspector console... I tried compiling with MinGW32 and also with MSVC 2013 with same results.
I tried the same webpage with Qupzilla WebBrowser and it works!!, even in Windows (so I am afraid that is Qt setting in my app, that is only needed in Windows environment, but I couldn't find for it in the QupZilla sources...)
Error detail in windows:
(In linux the same action produces no error)
Top: Linux build, processed 45 requests, Windows build(bottom) stopped at 15 requests..., same code:
Another things I tried:
- Changing user agent
- Playing with QWebSettings
- And maybe another unuseful tries.
Any clue to get my page fully loaded into the Windows QWebView?

PyCharm: Debug Javascript in Django Template

I cannot figure out how to debug javascript, using PyCharm, in a Django template.
When I attempt to debug a template -- by using the context menu item Debug while in the template -- the debugger launches, chromium launches, and I see the following error message in the PyCharm debugger console:
GET http://localhost:8000/login net::ERR_CONNECTION_REFUSED
Needless to say nothing shows up in the chromium window.
I've seen hints that I'm supposed to "open the generated file" from within the PyCharm debugger scripts tab. But since chromium isn't loading anything there's nothing to open.
I have the JetBrains chromium debugger installed and, so far as I can tell, running.
What's the procedure for debugging javascript in a Django template from within PyCharm?
Set up a debug configuration for Javascript (not Remote Firefox/Remote Chrome as the documentation might lead you to). Set the URL to the entrypoint of your application that renders the template and run this config. It should launch a browser and stop at any breakpoints you set in your javascript in pycharm.
Why not using a browser tool like firebug in browser or google chome debugging tools (depending on the browser you use), If your code is client side, since I assume that the server side part of the application is written in python scripts it's the easiest solution.
I have also used JSDT in eclipse but it was not as convenient.
For the error you posted I think it's server-side / networks error, check your views.py or an example from the django tutorial to see if it is exposed in WSGI (django default web server ).

Debug JavaScript code in vs.net 2010

I have a win-form Application with a web browser control.
i use a JavaScript code in this web browser.but some times my JavaScript code return error
I want to know is it possible to debug JavaScript code in vs.net 2010?
You can debug Javascript running in an ASP.Net application (WebForms or MVC), but not in your Win Forms application. If you have the code for the site that the browser control is running then you can start a session of that in VS 2010 and debug away.

Categories