Thursday, April 13, 2017

debugging TypeScript in Google Chrome Developer Tools

This can take a few different shapes at the "Sources" tab in that the TypeScript files may at first be hard to find or tucked away in their own subsection, boundaries defined by one of those little cloud icons. Just look through everything that is there and you'll see the .ts stuff eventually. It may be in its own folder tree hierarchy. I do not yet understand all of the factors that drive this. It looks different in different projects built out from different seeds. Set breakpoints in the .ts files. You'll be able to hit them. You do not have to debug in the generated JavaScript and then try to reverse engineer how to find the equivalent to a given line of code back in the .ts stuff. Ha. Remember that you're not in Visual Studio anymore and F8 lets you move forward from a breakpoint in debugging and not F5. I hit F5 all the time and end up refreshing the browser. It's infuriating. It makes me think of how in jumping from Windows 3.11 to Windows 95 there was suddenly an X where the icon for maximizing a window used to be at the upper right and I'd try to maximize a window and end up closing it. It made me cranky. I digress.

No comments:

Post a Comment