Questions tagged [console]

A mechanism for interacting with a computer operating system or software by typing commands to perform specific tasks

A console is an interactive text-mode or text-based user interface to a software application or operating system. It may be implemented as a character-mode application or embedded in a graphical user interface.

It may be used as the main user interface or as a secondary interface for debugging and administrative tasks. The degree of interactivity varies widely between consoles.

12712 questions
246
votes
4 answers

Very simple log4j2 XML configuration file using Console and File appender

I'd like a very simple XML configuration file with a console and a file appender using log4j2. (The Apache Website is killing me with much Information.)
Thorsten Niehues
  • 11,698
  • 18
  • 69
  • 94
242
votes
10 answers

How to include JavaScript file or library in Chrome console?

Is there a simpler (native perhaps?) way to include an external script file in the Google Chrome browser? Currently I’m doing it like this: document.head.innerHTML += '';
technocake
  • 2,529
  • 2
  • 13
  • 4
240
votes
8 answers

How do I trap ctrl-c (SIGINT) in a C# console app

I would like to be able to trap CTRL+C in a C# console application so that I can carry out some cleanups before exiting. What is the best way of doing this?
Nick Randell
  • 16,403
  • 17
  • 57
  • 67
222
votes
19 answers

clear javascript console in Google Chrome

I was wondering if I could clear up the console with some command.. console.log(), can print... is there a command to clear up console?.. I've tried to console.log(console); and got this functions below... assert: function assert() { [native code]…
Reigel
  • 61,807
  • 21
  • 115
  • 133
212
votes
8 answers

Show/Hide the console window of a C# console application

I googled around for information on how to hide one’s own console window. Amazingly, the only solutions I could find were hacky solutions that involved FindWindow() to find the console window by its title. I dug a bit deeper into the Windows API and…
Timwi
  • 61,190
  • 29
  • 155
  • 224
207
votes
7 answers

Accessing console and devtools of extension's background.js

I just started out with Google Chrome extensions and I can't seem to log to console from my background js. When an error occurs (because of a syntax error, for example), I can't find any error messages either. My manifest file: { "name": "My First…
204
votes
35 answers

How to stop C++ console application from exiting immediately?

Lately, I've been trying to learn C++ from this website. Unfortunately whenever I try to run one of the code samples, I see that program open for about a half second and then immediately close. Is there a way to stop the program from closing…
Adam P
  • 4,345
  • 6
  • 27
  • 40
200
votes
9 answers

C#: Printing all properties of an object

Is there a method built in to .NET that can write all the properties and such of an object to the console? Could make one using reflection of course, but I'm curious to if this already exists... especially since you can do it in Visual Studio in the…
Svish
  • 138,188
  • 158
  • 423
  • 589
199
votes
22 answers

How to keep the console window open in Visual C++?

I'm starting out in Visual C++ and I'd like to know how to keep the console window. For instance this would be a typical "hello world" application: int _tmain(int argc, _TCHAR* argv[]) { cout << "Hello World"; return 0; } What's the line…
Raúl Roa
  • 10,841
  • 13
  • 45
  • 62
193
votes
11 answers

Why doesn't "System.out.println" work in Android?

I want to print something in console, so that I can debug it. But for some reason, nothing prints in my Android application. How do I debug then? public class HelloWebview extends Activity { WebView webview; private static final…
TIMEX
  • 217,272
  • 324
  • 727
  • 1,038
192
votes
14 answers

Save the console.log in Chrome to a file

Does anyone know of a way to save the console.log output in Chrome to a file? Or how to copy the text out of the console? Say you are running a few hours of functional tests and you've got thousands of lines of console.log output in Chrome. How do…
eeejay
  • 4,246
  • 7
  • 26
  • 29
179
votes
20 answers

Chrome: console.log, console.debug are not working

Console.log and debug not printing, only return undefined. Why it can be? I've tried to re-install chrome, but it doesn't help. Here is screenshot from chrome's main page, so functions are not redefined in some code
Ihar Krasnik
  • 1,979
  • 2
  • 11
  • 17
174
votes
6 answers

vbscript output to console

What is the command or the quickest way to output results to console using vbscript?
Regmi
  • 2,368
  • 4
  • 22
  • 32
172
votes
17 answers

How to disable logging on the standard error stream in Python?

How to disable logging on the standard error stream in Python? This does not work: import logging logger = logging.getLogger() logger.removeHandler(sys.stderr) logger.warning('foobar') # emits 'foobar' on sys.stderr
sorin
  • 137,198
  • 150
  • 472
  • 707
172
votes
6 answers

Reload the path in PowerShell

If I have an instance of PowerShell ISE running and I install something that modifies the PATH or I modify it in any way outside of PowerShell then I need to restart PowerShell for it to see the updated PATH variable. Is there a way to reload the…
rob
  • 16,110
  • 12
  • 63
  • 90