Chrome JavaScript Debugging – how to save break points between page refresh or break via code?

You can put a debugger; to break in most of the JavaScript environments. They will persist for sure. It’s good to have a minifier that rids the debugger and console.log calls for the production environment, if you are using these. In the recent versions of Chrome browser, there is a “Preserve Log” option on the … Read more

Are “EXC_BREAKPOINT (SIGTRAP)” exceptions caused by debugging breakpoints?

Are “EXC_BREAKPOINT (SIGTRAP)” exceptions caused by debugging breakpoints? No. Other way around, actually: A SIGTRAP (trace trap) will cause the debugger to break (interrupt) your program, the same way an actual breakpoint would. But that’s because the debugger always breaks on a crash, and a SIGTRAP (like several other signals) is one type of crash. … Read more

How to set a conditional breakpoint in Xcode based on an object string property?

You can set a conditional break point in Xcode by setting the breakpoint normally, then control-click on it and select Edit Breakpoint (choose Run -> Show -> Breakpoints). In the breakpoint entry, there is a Condition column. Now, there are several issues to keep in mind for the condition. Firstly, gdb does not understand dot … Read more

Breakpoint at “throw new SilentExitException()” in Eclipse + Spring Boot

This is unfortunately a know issue with the new spring-boot-devtools module (see https://github.com/spring-projects/spring-boot/issues/3100). We use this trick to kill the main thread so that we can replace it with a re-loadable version. So far I’ve not found a way to prevent the debug breakpoint from triggering. For now, you can toggle the “suspend execution on … Read more

Debugging automatic properties

Using Visual Studio 2008, 2010, 2012, 2013: Go to the Breakpoint window New -> Break at Function… For the get, type: ClassName.get_Counter() For the set, type: ClassName.set_Counter(int) You’ll get a “No Source Available” when the breakpoint is hit, but you’ll get the calling location in the call stack. I found this solution here on MSDN

Getting GDB to save a list of breakpoints

As of GDB 7.2 (2011-08-23) you can now use the save breakpoints command. save breakpoints <filename> Save all current breakpoint definitions to a file suitable for use in a later debugging session. To read the saved breakpoint definitions, use the `source’ command. Use source <filename> to restore the saved breakpoints from the file.

Android Studio IDE: Break on Exception

To break on all exceptions, caught or uncaught: Open the Breakpoints window via Run -> View Breakpoints. The Breakpoints dialog appears. In the left pane, scroll to the bottom. Select Any exception under Java Exception Breakpoints With Any exception selected, on the right pane, configure as follows: Suspend: checked All: selected Condition: !(this instanceof java.lang.ClassNotFoundException) … Read more