news.volyx.in

Debugging tricks in the browser (alan.norbauer.com)

646 points by bkudria · 1016 days ago · 122 comments on HN

Article summary

The article discusses various debugging tricks and techniques that can be used in web browsers, including advanced conditional breakpoints, logpoints, and tracing callstacks. These techniques can help developers identify and fix issues in their code more efficiently. The article also covers other topics such as performance profiling, debugging property reads, and inspecting the DOM. The techniques described are applicable to Chrome, Firefox, and Edge browsers.

Main themes

  • debugging techniques
  • browser debugging tools
  • security implications
  • web development vs back-end development
  • anti-debugging measures
  • browser extensions and workarounds

What commenters say

  • Some commenters feel that the debugging experience in web development is superior to that in back-end languages.
  • Others argue that some back-end languages, such as Java, have good debugging experiences, especially with the use of certain IDEs.
  • There is a discussion about the security implications of certain debugging features, with some arguing that they could be used to leak sensitive information.
  • Some commenters propose deprecating the debugger statement or requiring an explicit opt-in to prevent websites from hijacking it.
  • Others suggest that browser makers should ignore 'debugger' statements by default, with an opt-in in the dev tools.
  • A few commenters mention that some websites use various techniques to prevent debugging, including calling 'debugger' every second or using entrapped sourcemaps.
  • Some propose creating extensions or monkey-patching to work around these anti-debugging measures.