Tagged: Debug
- This topic has 9 replies, 2 voices, and was last updated 9 years, 9 months ago by Halle Winkler.
-
AuthorPosts
-
July 2, 2014 at 12:58 pm #1021819Daniel AsherParticipant
Hi,
I’m new here and am looking forward to working with OpenEars!
I’ve downloaded the OpenEarsDistribution and have successfully stepped into OpenEarsSampleApp, but have not managed to step into OpenEars.
The steps I took were:
* Opened OpenEarsSampleApp into Xcode 5.1.1
* Dragged OpenEars into OpenEarsSampleApp as a subproject
* Added OpenEars as a OpenEarsSampleApp -> Build Phases -> Target Dependency
* Placed first breakpoint at ViewController.m:71
* Placed second breakpoint at PocketsphinxController.m:85
* Product -> RunThe first breakpoint is hit, but the second is not.
I know OpenEars.framework is being built and loaded correctly because inserting an NSAssert(false,…) before PocketsphinxController.m:85 causes OpenEarsSampleApp to fail with an uncaught exception.Any help to enable debugging into OpenEars Objective-C and pocketsphinx C would be much appreciated!
regards,
Daniel
July 2, 2014 at 1:03 pm #1021820Halle WinklerPolitepixWelcome Daniel,
A framework is already object code – you can’t add breakpoints to it. What do you need to debug? Maybe I can help.
July 2, 2014 at 3:09 pm #1021824Daniel AsherParticipantHi Halle,
Many thanks for your quick response! I’m sure you can help :)
I wish to step through pocketsphinx code to help me understand how it works. I believe I’m building the object code in Xcode. Is Xcode able to produce a debug version of the framework?
Daniel
July 2, 2014 at 3:22 pm #1021825Halle WinklerPolitepixSure, you can definitely build a debug version by setting the target’s scheme to build/run debug, but when you build it, the target is a framework which is compiled object code that your app then links to, so no breakpoints since there is nothing in the workspace connecting the built framework and your project changes. I think that stepping through OpenEars in a debugger is probably not going to be a good approach for learning how Pocketsphinx works, since OpenEars is really designed for painless continuous-listening app and vocabulary building and that means it ships a drag-and-drop framework to keep things simple.
I think an elegant way to use your approach for learning Pocketsphinx would be to step into the Pocketsphinx executables for Linux, which are easy to build on (for instance) Ubuntu. I always keep an Ubuntu virtual machine (or several) around for when I need to get quality time with Pocketsphinx directly.
July 2, 2014 at 3:50 pm #1021826Daniel AsherParticipantHi Halle,
I don’t have Linux or Ubuntu. So I must ask – is it impossible to step into OpenEars.framework from OpenEarsSampleApp in Xcode?
I feel there must be a solution to this problem.
thanks,
Daniel
July 2, 2014 at 3:56 pm #1021827Halle WinklerPolitepixHi Daniel,
is it impossible to step into OpenEars.framework from OpenEarsSampleApp in Xcode?
Yes, this is what I have been saying in my answers above. A built framework does not have a mechanism for sharing its breakpoints with an app project. If Apple shipped their iOS frameworks with breakpoints turned on accidentally, they would also not break in your debugger when you linked an app to those frameworks.
July 2, 2014 at 5:25 pm #1021834Daniel AsherParticipantHi Halle,
can you share how you use the Xcode debugger with the OpenEars.framework? I would really appreciate any guidance here. Do you compile to a static library – any tips would help!
many thanks,
Daniel
July 2, 2014 at 5:33 pm #1021836Halle WinklerPolitepixHi Daniel,
I have a very particular setup here for testing and it’s unfortunately a bit outside of the scope of the support I can give here. Sorry! This hasn’t come up before as a developer need, but the use case you’ve described sounds like a perfect match for doing your debugging directly on Pocketsphinx’s executables, since Pocketsphinx is your interest in stepping through rather than OpenEars. VirtualBox and Ubuntu are 100% free and they make a great setup for doing exactly the kind of Pocketsphinx research you have described.
July 2, 2014 at 6:22 pm #1021837Daniel AsherParticipantHi Halle,
of course it is disappointing to hear that stepping through and debugging the source code is not currently supported by the OpenEars project. I really hope that this can be changed in the near future.
I have started to play with the code, modifying it to return ps_seg_frames in getAndReturnHypothesisForDecoder. I need these for my application. I very much hope to work with you and OpenEars in the future, but without debugging support I believe my workflow will be frustrated.
Any hints, however quick, will be very much appreciated!
with kindest regards,
Daniel
July 2, 2014 at 6:34 pm #1021839Halle WinklerPolitepixSorry!
-
AuthorPosts
- You must be logged in to reply to this topic.