Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode Unit Tests: Xcode doesn't stop at breakpoints

Using Xcode 6.3 Beta 2 with Units Tests I have the following problem:

When I do unit testing the breakpoints in the unit-test module work but the break codes in the code under test don't are ignored.

Any ideas?

like image 350
Timm Kent Avatar asked Mar 10 '15 11:03

Timm Kent


People also ask

Why breakpoints are 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.

What does a dotted breakpoint mean in Xcode?

New in Xcode 13, if a breakpoint is not resolved to any location by LLDB, Xcode will show you a dashed icon. There is a myriad of reasons why a breakpoint is not resolved but there are some common explanations. If you hover over the unresolved breakpoint icon, we have a tooltip that can help you out.

What is XCTest in Xcode?

Use the XCTest framework to write unit tests for your Xcode projects that integrate seamlessly with Xcode's testing workflow. Tests assert that certain conditions are satisfied during code execution, and record test failures (with optional messages) if those conditions aren't satisfied.

How do breakpoints work in Xcode?

Navigate to a line in your code where you want execution to pause, then click the gutter or line number in the source editor to set a breakpoint. 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.


1 Answers

I had the same issue and the reason was the scheme settings:

1.- Edit your scheme

2.- Choose "Test" in the left panel

3.- Check the "Debug executable" option

That was all.

enter image description here

like image 67
Viker Avatar answered Oct 17 '22 01:10

Viker