Simulating tracepoints in Chrome dev tools

There’s a very under rated feature in MS Edge’s F12 tools called tracepoints. A tracepoint is like a breakpoint but it calls console.log with the statement you provide it. This is really useful want to inspect some state as your application…

There’s a very under rated feature in MS Edge’s F12 tools called tracepoints. A tracepoint is like a breakpoint but it calls console.log with the statement you provide it. This is really useful want to inspect some state as your application runs but don’t want to interupt the application flow by adding a breakpoint, or can’t modify your code and inject console.log statements (eg: production environments). Well it turns out that we can easily simulate this in the Chrome dev tools (and I suspect Firefox too, but I don’t spend much time debugging in Firefox), and that’s by exploiting the conditional breakpoints
Print Share Comment Cite Upload Translate
CITATION GOES HERE CITATION GOES HERE
Select a language: