Chrome debugger breaks at the wrong point or doesn't work at all (typescript)

At first I thought that my control points just didn’t work and were going on a wild goose chase. Then I used the "debugger" in my code, and everything became strange ... From what I understand, the keyword "debugger" is basically akin to placing a breakpoint through the code.

Here is an example:

enter image description here You can see that I placed a "debugger" where I set a breakpoint, but instead the highlighted code is different from the other. However, looking at the scope, it seems that the correct code is executing:

enter image description here

I also noticed that if I put random breakpoints in the Chrome Dev Tools.ts file, they will sometimes be hit when the code elsewhere in the file is executed.

This makes debugging mostly pointless.

- ? ?

- , , , , .

Edit:

@Matt Zeunert , ( ), . , , .

+4

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


All Articles