Has anyone had success debugging on OSX?
Jacob Carlborg via Digitalmars-d-debugger
digitalmars-d-debugger at puremagic.com
Thu May 19 23:59:08 PDT 2016
On 2016-05-19 15:14, pineapple wrote:
> Anything that helps me narrow down where this error "malloc: *** error
> for object 0x7ff34387e600: pointer being freed was not allocated" is
> actually occurring is a win in my book.
>
> Ideally I'd like to be able to step through code in a visual environment
> and evaluate expressions like I do in tools like PyCharm's Python
> debugger,
You can debug your application in Xcode. You would need to create a
dummy project:
1. File -> New -> Project
2. Other -> Empty -> Next
3. Type a name then choose where to create it
4. In the top left corner in the toolbar, click "No Scheme"
5. Click New Scheme
6. Type a name
7. In the right side, choose Run
8. In the middle, choose Info -> Executable -> Other and pick your
application, then close the dialog
9. Now click the run button (the one looking like a play button) in the
top left corner in the toolbar
When your application crashes it should open the debugger view. You
might need to add your source files to the project to get a source
mapping. Do that by dragging them to the left side in the Xcode window.
but for now I'm just trying to solve this specific problem and
> a stack trace would be very helpful.
Just to get a stack trace it's enough to run your program through lldb:
"lldb my_program". When it crashes, execute the "bt" (backtrace) command
to print the stack trace.
> Perhaps you could post a short guide on how to set up the tools you use
> for debugging?
--
/Jacob Carlborg
More information about the Digitalmars-d-debugger
mailing list