Where is the StackBlitz console?
Asked Answered
C

5

13

At the end of the Angular's "Getting started/try it/using forms for user inputs", we are asked at the end to "open the console to see an object containing the name and address you submitted.". But I only have a terminal where the app is running, and a classic terminal at my disposal.

Where is the console which shows the log of (in cart.component.ts line 28):

console.warn('Your order has been submitted', this.checkoutForm.value);

enter image description here

It's not in the inspect page.

[Edit]

To me it's not at the bottom of the page as Robert proposed. Maybe there's a console option to enable somewhere?

enter image description here

Calabresi answered 19/11, 2022 at 18:4 Comment(0)
C
6

When you use the "ready-made sample project in StackBlitz" from Angular "try it/Getting started", it doesn't have a console.

The console is present as Roberts screen shows when you create a new project from StackBlitz.

Calabresi answered 19/11, 2022 at 19:41 Comment(0)
S
5

I experienced the same thing, where the forked "Getting Started" Angular project on StackBlitz didn't show a console option. To see a console I clicked "open in new tab" in the top right, and then I used the browser console (e.g. to see Chrome's console right click on the output page and select 'Inspect', then click on the 'Console' tab).

View open in new tab button location enter image description here

View example chrome console; enter image description here

Soursop answered 4/5, 2023 at 2:3 Comment(1)
That is so annoying, I don't want it in a new tab, I want it in the same view like it used to be.Mcsweeney
O
1

It should be at the bottom of the page:

enter image description here

Update If you happend to use Vite etc. WebContainers then open the DevTools (F12):

enter image description here

Omaomaha answered 19/11, 2022 at 18:25 Comment(5)
Ignore downvote, which browser you use? have you tried to reload the whole page? try to start a brand new project is it there?Omaomaha
How did you get the terminal?Unreal
@Unreal press F12Omaomaha
That is an old screen shot. The Console is no longer available to new stackblitz projects. You can use chrome developer tools, but the convenience of having it below the preview is no longer an option that I can findParvis
@Parvis this was posted in 2022, but you can still open the devtools and see the console output thereOmaomaha
M
0

As a workaround you could use alert:

alert(this.checkoutForm.value.address);

The alert method displays a popup box with whatever message you pass it. More info here

Manichaeism answered 1/10, 2023 at 19:3 Comment(0)
L
0

Opening your browser console is one option, but then you end up with all the output from the entire page, which can make it frustrating to read and also affects the speed of the output. This is something the old inline console helped avoid.

enter image description here

A solution to this is to click the second from right button in the preview pane to 'Open preview in new tab'.

enter image description here

Once opened, open the console in the new tab and you'll only see the output from your code.

Lumbricalis answered 5/6, 2024 at 11:2 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.