Enabling debug mode in type checker

I've been looking into ConstraintSystem in Sema lately, and notice that it has DebugConstraintSolver in Context's LangOptions.

How do I enable it? How do I fetch the debug data once it's enabled?

I've compiled it using swift/utils/build-script -R --debug-swift.

Try: swift -frontend -typecheck -debug-constraints.
There may be a shorter invocation, but I don't know one.

2 Likes

Thanks! Works like charm.

For the record, I found a (slightly) shorter one when compiling here.

swiftc -Xfrontend -debug-constraints
Terms of Service

Privacy Policy

Cookie Policy