Chrome not throwing Javascript syntax error on Developer console

I am working on a project. So there were multiple syntax error inside the code like:

  • forgot to add comma after key value pair:

    {
      test: 'test1'
      test2: 'test2'
    }    
    
  • Or logging undefined variable:

    console.log(test)
    

When I set debug point to above console.log, it correctly says “Reference Error: Undefined variable” on hover the variable. But it doesn’t print the error on console.
Becoming really hard to debug the syntax error code.

I have checked the type of message to display on console, in dropdown. “Info”, “Warning”, “Errors” are selected.

enter image description here

Note: If I create new file and add buggy code. It works fine in chrome (as in correctly throwing error).