Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am running Angular in a PhpStorm IDE.

The code is fill with "console.log" calls, when console defined as declare var console: Console; Console in a interface in the lib.dom.d.ts library.

Anyway, I can't see this log anywhere! Where is the console window in PhpStorm?

Is there any simple way to define log in Angular? I saw something about ngx-logger library, but I didn't find any instructions of how to install this library.

Any help in angular log subject will be great!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
4.4k views
Welcome To Ask or Share your Answers For Others

1 Answer

All logs from console.log you can see in browsers console (To open the developer console in Google Chrome, open the Chrome Menu in the upper-right-hand corner of the browser window and select More Tools > Developer Tools. You can also use the shortcut Option + ? + J (on macOS), or Shift + CTRL + J (on Windows/Linux).) Also you don't need to declare console, it's global variable.

All logs in your code will be runed in browser (in runtime). In IDE you can see only build time logs.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...