Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging embedded framework not working as expected when debugging super classes or protocol extensions/implementations

I wrote a pure Swift framework which I am embedding inside my project.

Debugging is working fine when I debug code that I am using straight from my app.

For example, if I write a Dog class inside the framework with a method and I call it from my app, everything is fine.

But, if I write a base class like Animal and then a Dog class inside my app module that inherits from Animal and the breakpoint reaches the implementations on Animal, it shows like this:

breakpoint

The same occurs if Animal is a protocol and I write an extension or default implementation inside it and I call the method from an instance of Dog.

I already checked that I am indeed running the framework in debug mode, with no optimization, not stripping symbols and also using DWARF and dSYM.

like image 243
David Bemerguy Avatar asked Jul 09 '17 12:07

David Bemerguy


People also ask

Why is my VS Code debugger not working?

Debugger not working Look at the debugger console for any error messages displayed. Look at the Debugger Tools console output for any errors. Remember to re-start VS Code once done (this won't be necessary in a future release). Solution: Clear all expressions from the debugger Watch window and start debugging again.

Why are my breakpoints not working?

If a source file has changed and the source no longer matches the code you're debugging, the debugger won't set breakpoints in the code by default. Normally, this problem happens when a source file is changed, but the source code wasn't rebuilt. To fix this issue, rebuild the project.

How do you Debug a framework?

Under Tools (or Debug) > Options > Debugging > General, select Enable . NET Framework source stepping.

How do I change Debug config in VS?

To change the build configuration, either: On the toolbar, choose either Debug or Release from the Solution Configurations list. From the Build menu, select Configuration Manager, then select Debug or Release.


1 Answers

This is known issue in Xcode, I met same in 9.2. I always clear the derrived data and clean project/ rebuild and it works.

like image 168
Jacek Grygiel Avatar answered Oct 15 '22 02:10

Jacek Grygiel