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
58
votes
7 answers

Difference between console.log and sys.puts in node.js?

In node.js you can use console.log or sys.puts to print out to the screen. What is the preferred method and what is the difference between these?
never_had_a_name
  • 90,630
  • 105
  • 267
  • 383
58
votes
1 answer

How to set Golang's log output back to console?

Google Go's log package has SetOutput - a function for setting the log output to any io.Writer. After I set it for testing, I would like to revert the output back to the standard console output - how do I do that? I don't see any obvious way of…
ThePiachu
  • 8,695
  • 17
  • 65
  • 94
58
votes
6 answers

Is it possible to run JavaScript files from the command line?

I have several JS files so instead of copy and paste every one in the console window (Firefox and Chromium), I would want to call them from the shell if it is possible. Every JS file has test functions that show if they are correct using…
user1243746
57
votes
14 answers

Console.log doesn't work, devtools console shows no errors

A bunch of code isn't working and I'm trying to identify where the problem lies but console.log() isn't logging any results in Chrome Dev tools, am I doing it correctly? $(window).scroll(function() { $('section').each(function(){ …
egr103
  • 3,858
  • 15
  • 68
  • 119
56
votes
10 answers

node.js displays "undefined" on the console

Recently I installed node.js on my Windows 7 machine. On execution of JavaScript, I get an undefined message along with successful execution of the expression. What's wrong here? I have not noticed any other side effects.
Sandeep G B
  • 3,957
  • 4
  • 26
  • 43
56
votes
7 answers

Rewrite multiple lines in the console

I know it is possible to consistently rewrite the last line displayed in the terminal with "\r", but I am having trouble figuring out if there is a way to go back and edit previous lines printed in the console. What I would like to do is reprint…
JRJurman
  • 1,615
  • 2
  • 19
  • 30
56
votes
4 answers

How to output to console in UWP on Windows 10?

Is there a way to write to console / command prompt / powershell (like Console.WriteLine()) or anything similar in UWP apps? If console is unavailable is there a proper alternative that I can use instead to write to the screen large amounts of…
Bad
  • 4,967
  • 4
  • 34
  • 50
55
votes
5 answers

How to sign in a user using Devise from a Rails console?

After loading the Rails console, how should I sign in a user? Devise provides a test helper which can be used in tests and I've tried to use in console: >> include Devise::TestHelpers >> helper.sign_in(User.first) But I get: NoMethodError:…
Christian
  • 1,872
  • 1
  • 14
  • 14
55
votes
4 answers

Why doesn't my terminal output unicode characters properly?

For example, my terminal does this: $ echo -e "\xE2\x98\xA0" ��� I expect it to do this: $ echo -e "\xE2\x98\xA0" ☠ Why? How do I make my terminal output the proper unicode symbols? I'm using Gnome 3's Terminal on Arch Linux. The output of locale…
trusktr
  • 44,284
  • 53
  • 191
  • 263
54
votes
13 answers

How to unzoom Chrome-* console

I've a little problem with chromium 19.0.1058.0 (124615). I've been in the console on the "new tab" tab. Then i wrote a function in the console, then i typed "}" (with alt-gr). It zoomed my console. What can i do to reset the zoom in DevTools?
Extaze
  • 1,117
  • 2
  • 10
  • 18
54
votes
9 answers

Console.WriteLine and generic List

I frequently find myself writing code like this: List list = new List { 1, 3, 5 }; foreach (int i in list) { Console.Write("{0}\t", i.ToString()); } Console.WriteLine(); Better would be something like this: List list = new…
Justin R.
  • 23,435
  • 23
  • 108
  • 157
54
votes
5 answers

Swift 2, warning: could not load any Objective-C class information from the dyld shared cache

I have found a few questions regarding this issue, yet none of them were helping with my problem. I am trying to save an object to core data using this code (which worked perfectly fine in Xcode 6 and Simulator...): let fetchRequest =…
zero
  • 745
  • 1
  • 5
  • 12
54
votes
1 answer

Sass: print to terminal

Is there a way to have Sass print out a variable to the terminal?
JinxedAqua
  • 591
  • 1
  • 4
  • 5
54
votes
5 answers

Equivalence of Rails console for Node.js

I am trying out Node.js Express framework, and looking for plugin that allows me to interact with my models via console, similar to Rails console. Is there such a thing in NodeJS world? If not, how can I interact with my Node.js models and data,…
AdamNYC
  • 19,887
  • 29
  • 98
  • 154
54
votes
7 answers

How do I get the handle of a console application's window

Can someone tell me how to get the handle of a Windows console application in C#? In a Windows Forms application, I would normally try this.Handle.
Grant
  • 11,138
  • 32
  • 94
  • 140