Questions tagged [console]

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

A terminal 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.

A terminal 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 terminals.

A console is a particular type of terminal, usually a physical terminal or a terminal implemented directly by the kernel. The term "console" is often incorrectly used in place of "terminal".

14034 questions
280
votes
11 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,909
  • 2
  • 15
  • 4
278
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
  • 17,805
  • 18
  • 59
  • 74
258
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
  • 17,995
  • 12
  • 69
  • 94
257
votes
17 answers

What happened to console.log in IE8?

According to this post it was in the beta, but it's not in the release?
leeand00
  • 25,510
  • 39
  • 140
  • 297
247
votes
9 answers

C#: Printing all properties of an object

Is there a method built into .NET that can write all the properties and such of an object to the console? One could make use of reflection of course, but I'm curious if this already exists...especially since you can do it in Visual Studio in the…
Svish
  • 152,914
  • 173
  • 462
  • 620
246
votes
10 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
  • 65,159
  • 33
  • 165
  • 230
233
votes
17 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
  • 5,394
  • 8
  • 29
  • 30
233
votes
21 answers

Removing colors from output

I have some script that produces output with colors and I need to remove the ANSI codes. #!/bin/bash exec > >(tee log) # redirect the output to a file but keep it on stdout exec 2>&1 ./somescript The output is (in log file): java (pid 12321)…
Pawel P.
  • 3,731
  • 4
  • 20
  • 20
232
votes
24 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
  • 2,499
  • 2
  • 13
  • 17
230
votes
9 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…
229
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 Gallarde
  • 64,198
  • 21
  • 121
  • 139
217
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,603
  • 6
  • 31
  • 40
214
votes
7 answers

Difference between console.log() and console.debug()?

Google has not been helpful for me, since searching for "console.debug" just brings up a bunch of pages that have the words "console" and "debug" on them. I'm wondering what the difference is between console.log() and console.debug(). Is there some…
CaptSaltyJack
  • 15,283
  • 17
  • 70
  • 99
212
votes
22 answers

How to disable logging on the standard error stream?

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
  • 161,544
  • 178
  • 535
  • 806
209
votes
12 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
  • 259,804
  • 351
  • 777
  • 1,080