How to get no string or js error file name?

I am a little tired of such errors:

enter image description here

It says nothing about which file or which function or which line.

In this case, it was the caller’s line

vm.setDates(new Date(vm.checkin*1000).format('M d Y'), new Date(vm.checkout*1000).format('M d Y')) 

And some functions in the code were the .format function, where there was an error.

Is there a way to improve the "error directions" than app.bundle.js: 12345 ??

+5
source share
1 answer

I think you should use sourcemaps. Sourcemap is a mapping between the generated / converted / mini JavaScript file and one or more source source files. The main purpose of sourcemaps is to help debugging. Basically, if theres an error in the generated code file, the map can tell you the original location of the source file. Link: Sourcemaps .

+1
source

Source: https://habr.com/ru/post/1270061/


All Articles