I am trying to debug an application that runs on qt-webkit. If I run the application with --remote-debugging-port=<port> command line argument I can access development tools in my chrome browser but I can't use the console at all.
I can't send commands in the console at all. I've tried with other application build on top of that and the problem is there too. One of the apps is facebookeMessengerForDesktop app.
Does anyone knows how to fix this or can you propose a way to send commands from the application without the console.
Well I could not find why this is not working but I found a workaround.
You can define a new function that is used as the console. The function code is:
function v(command) {
WebInspector.ConsoleView.prototype._appendCommand.call({_prompt: {text: ""}}, command, true);
}
You can use it in your browser console. When it is called it prints the command output in the context of the debugged application (the native one).
Related
I am using protractor to test my angular application.I would like to console.log('Statement') to the browser console. However when I do this this is directed to the console/terminal from which I invoked the protractor script.
How can I access the browser console and write into it?
Use executeScript to run any JavaScript in the current window. You can pass a string or a function, I prefer the string version personally:
browser.executeScript('console.log("hello")');
Function version:
browser.executeScript(() => {
console.log('hello');
});
In Play, I can start an interactive console, and then start the application within it, as below:
[app] $ console
scala> new play.core.StaticApplication(new java.io.File("."))
Is it similarly possible to drop into an interactive console for an already running Play application? Is there an SBT task in the wild that can do this?
I don't understand the question fully, such as what are you wanting to do while the application is running? However, If I wanted to use the interactive console while a play application was running, I would use the console within the IDE and use a separate terminal/console to run the application. Hope this helps.
Eclipse uses console view as read-only.
How can I type command in console view? Is it possible? E.g: ls, mvn install...
Edited:
Thanks Ben and Kelly.
I understand I can interact with Eclipse's console when my application is running. However, I meant I want an embedded console as like as the one in Kate, Dolphin (press F4 in Dolphin)... So I can use bash script in Eclipse's console. Is that possible? Or is there a plugin for that? I have googled but perhaps my keywords were not right...
Edited
Edward has found duplicate question here: Is there an Eclipse plugin to run system shell in the Console?
And it was answered :-)
I don't know how to mark this one as solved. So I place message here, I got the answer.
Edited
But it is not useful. It doesn't have auto complete feature, when I need to type a long file name, or want a hint for a forgotten name,... it is worst :-(
When the console is waiting for input it shows a green prompt that allows you type.
You can test it out by making a simple console application that reads from standard input.
You are trying to think of the Eclipse console as if it were connected to a command-line process. It is actually connected to the JVM used to execute your Java code. Thus, it only shows output that your program sends to System.out and conversely only is available for input if the Java code you are running is requesting input from System.in.
A decent exercise would be to write a small Java program that redirects the input and output to a child process of your favorite shell, for example: http://www.devdaily.com/java/edu/pj/pj010016
The Eclipse Console view is used for communicating with an executed program (typically Java, or similar). If you want to use it as a console, as mentioned in the comment under #Ben S's answer, the Target Management Eclipse project provides a view that can be used for that reason. I don't have it installed right now, so I cannot tell you the required plug-in/view name, but I have used it to connect to the local computer and works.
Does any one know what is the use of Zend's console?
any sample program ?
Console = the shell, or command line. If you have Windows go to Run and enter 'cmd', if you have a Mac open Terminal. Console scripts are useful for long processes or things you want to schedule to occur on a regular basis (the 'cron' RaYell refers to).
For example, I wrote a link checker script for checking links for websites we develop. It's used to help QA sites and check for errors. That command looks something like:
php linkchecker.php http://www.domain.com
The third bit is any arguments that are passed to the script. These can easily be accessed via Zend Console Getopt which is the only stable component of Zend_Console I'm aware of.
More info on Zend Console Getopt - http://framework.zend.com/manual/en/zend.console.getopt.html
There are details of Zend Console itself which are on the developer wiki, but I don't know if this is currently being developed - http://framework.zend.com/wiki/display/ZFPROP/Zend_Console+-+Wil+Sinclair
Zend console allows you to write console apps in PHP. It can be very useful if i.e. you want to run certain actions of your app with CRON.
I am getting WatiN.Core.Exceptions.TimeoutException:
Timeout while Internet Explorer busy error while executing my tests via CruiseControl.Net.
Any one have idea how to resolve this?
While we are using TeamCity, we had to disable IE protected mode.
Also, check that user, under which watiN tests are being run can interact with desktop.
I know this question is old and answered, but below are some of my observations.
It is possible to run watin tests under a service account
but the following restrictions/prerequisites apply:
service must run in desktop interactive mode. Only available if running as system.
tests must not create a new windows, even alert/confirm dialogs
Ie cannot create a new window, so watin fails when looking for/expecting it to appear.
ie may show its own warnings, e.g. Insecure content in a secure Page, this can cause tests to fail*
if the tests fail/timeout and the ie instance is forcefully closed, the next instance may try to restore the previous state. The tests then appear to fail*
this can be turned off in the advanced settings.
*from what I've experienced, usually because the prompt is halting the document from being reported as loading-finished.
Feel free to add with other restrictions /comments.