How to add JS source map in Chrome devtools?

My deployed JavaScript application throws an exception. Javascript code is confusing. I would like to know which line in the source code throws an exception. Source maps are not deployed, so Chrome Devtools cannot connect them. I can have source maps on my localhost.

So basically, I would like to add the source maps from my machine to the browser to find out the line number where the exceptions occur.

I tried Add Folder to Workspaceand Map to File System Resource. It does not help. The exception is displayed in the browser console, but it still points to the running javascript source, and the desired line number is not detected.

I can do something wrong. Any help is appreciated (including an optional extension or using another browser).

+4
source share
1 answer

As powerful as Workspaces, there are some limitations you should be aware of.

Limitations

  • Only style changes are saved in the Elements panel; changes to the DOM are not saved.
  • Only styles defined in an external CSS file can be saved. Changes to the element.style or inline styles are not saved. (If you have built-in styles, you can change them in the Sources panel.)
  • Style changes in the Elements panel are saved immediately without explicit saving - Ctrl + S or Cmd + S (Mac) - if you have a CSS resource mapped to a local file.
  • , Chrome . - , Workspaces.
  • . .html URL-, .

https://developers.google.com/web/tools/setup/setup-workflow

0

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


All Articles