Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is my console.log() not logging anything in my browser?

I have a SSR page build on Nuxt (Vue). There is a simple code which runs in the browser.

methods: {
    submitGeneralForm() {
        alert("submit");
        console.log('teeeeeeeeeeeeeeeeeeeeest')
    }, 

SSR means that site it rendered on the server and then send to the browser. This piece of code should run in the browser. It is related to the button click. Alert works fine but I dont see any console.log() in the browser. Dont understand it. What is wrong with that?

EDIT:

Here is the example Github repository. Run yarn install + yarn dev to reproduce the issue. Node version v14.17.6 npm version 6.14.15 and yarn version 1.22.11 You will see alert() on page load from /layouts/default.vue which contains this code

export default {

    mounted() {
        alert('11111111111111');
        console.log('22222222222222');
        alert('33333333333333');
    }
};

This is screenshot of console.log() in console.

enter image description here

like image 999
Čamo Avatar asked Nov 29 '22 21:11

Čamo


1 Answers

Make sure you don't have anything in the console's filter input field.

For example, in the following image you can see the word "status" is masking the console.log() log lines:

enter image description here

like image 196
Arik Avatar answered Dec 04 '22 08:12

Arik