What different breakpoint icons mean in Eclipse?

blue ball: regular breakpoint, active (possibly with a hit count set) empty ball (i.e. white): breakpoint has been disabled (remove checkmark in the breakpoint view, or disable in context menu) diagonal line through breakpoint: all breakpoints have been disabled (button skip all breakpoints in breakpoint view) question mark next to breakpoint: a condition is active … Read more

Breaking JavaScript execution when cookie is set

Adding this snippet in the beginning of an html → head block works fine: <script type=”text/javascript”> function debugAccess(obj, prop, debugGet){ var origValue = obj[prop]; Object.defineProperty(obj, prop, { get: function () { if ( debugGet ) debugger; return origValue; }, set: function(val) { debugger; return origValue = val; } }); }; debugAccess(document, ‘cookie’); </script> See this … Read more

How to wait until remote .NET debugger attached

You can use the System.Diagnostics.Debugger.IsAttached property to check if a debugger is attached to the process. This application will wait until a debugger has been attached: using System; using System.Diagnostics; using System.Threading; namespace DebugApp { class Program { static void Main(string[] args) { Console.WriteLine(“Waiting for debugger to attach”); while (!Debugger.IsAttached) { Thread.Sleep(100); } Console.WriteLine(“Debugger attached”); … 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