Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Breakpoints not hit in Xcode (9.3)

Tags:

xcode

ios

swift

None of my breakpoints are being hit.

I've tried the following:

  • Deleted Derived Data directory
  • Cleaned build folder
  • Deleted the xcuserdata directory
  • Made sure build configuration is Debug and Debug executable is ticked
  • Made sure Generate debug symbols is set to Yes
  • Changed Optimization level to No optimization

The breakpoints are still not being hit.

like image 513
Questioner Avatar asked Apr 09 '18 11:04

Questioner


People also ask

Why breakpoint is not working in Xcode?

You might be pushing "Run" instead of "Debug" in which case your program is not running with the help of gdb, in which case you cannot expect breakpoints to work! In Xcode 6.4, there is now only a Run button and whether it runs a debug configuration or not depends on the currently selected scheme settings.

How do I enable breakpoints in Xcode?

Xcode displays a breakpoint icon to indicate the location. Drag a breakpoint up or down to move it to another location; drag it away from the gutter to remove it. Click the breakpoint icon in the debug area toolbar to activate or deactivate all breakpoints.

How do I toggle breakpoints?

The breakpoint is a toggle. You can click it, press F9, or use Debug > Toggle Breakpoint to delete or reinsert it. To disable a breakpoint without deleting it, hover over or right-click it, and select Disable breakpoint.

What does a dotted breakpoint mean in Xcode?

It means the breakpoint is on a line of code that will never be executed. For example: Follow this answer to receive notifications.


2 Answers

Try below steps

  1. Go to debug (top bar in Xcode)
  2. Debug Workflow
  3. Always show Disassembly - uncheck it
like image 195
Milap Kundalia Avatar answered Oct 31 '22 01:10

Milap Kundalia


In my case problem was in the Debug information format setting. It was set to DWARF instead of DWARF with dSYM File. Reseting it to the default value solved the problem.

like image 22
Alexander Ushakov Avatar answered Oct 31 '22 01:10

Alexander Ushakov