How to build and debug Swift standard library?

I'm interested in exploring the standard library by 'running' in the debugger. In the simplest case, say I wanted to add a print statement inside array append or something, or set a breakpoint.

What is the best approach to doing something like this?

I've downloaded the source and built using the 'debug standard library and Xcode flags' ( build-script -x -R --debug-swift-stdlib ).

This works fine. It generated an Xcode project at swift-source/build/Xcode-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/Swift.xcodeproj

What workflow is suggested to build and run the standard library? Can I write a unit test to exercise the standard library code, and set breakpoints, etc.?

7 Likes