How to force Chrome debugging tools to debug in pretty code?

前端 未结 6 2166
囚心锁ツ
囚心锁ツ 2021-02-02 07:33

Although I used pretty code and had set up the breakpoints in \"Pretty code\" tab, debugger keeps working in minified code. (I can\'t see exactly where I am and need to continuo

6条回答
  •  你的背包
    2021-02-02 08:20

    As of 2020, similar behavior still occurs in a specific situation:

    • You open a source-mapped document, i.e. it shows "(source mapped from ...)" on the bottom of the window
    • You prettify it
    • You place a breakpoint in the prettified version
    • The debugger will stop in the ugly source-mapped file

    The solution seems to be to go to the original source from which you mapped, prettify that, and place the breakpoint there.

    Chrome 79.0.3945.88 ; Webpack 4.41.2

提交回复
热议问题