Open finnvoor opened 8 months ago
This should be as simple as building with debug info -g
on your swiftc command and attaching to the process by name e.g. Playdate Simulator
This should be as simple as building with debug info
-g
on your swiftc command and attaching to the process by name e.g. Playdate Simulator
That's what I thought, but my breakpoints don't seem to be working in Xcode (they do in the Playdate examples Xcode projects)
Ah actually you're right, I was only adding -g to clang not swiftc. Now it works great 👌
Would be nice to set the simulator as the scheme executable to auto-attach, but then the build needs to either happen in:
Made some progress adding -g
to clang + swiftc and removing -O
, but now running into:
warning: pdex.dylib was compiled with a different Swift compiler (version '0') than the Swift compiler integrated into LLDB (version '6.0.0.4'). Swift expression evaluation requires a matching compiler and debugger from the same toolchain.
(lldb) p System.elapsedTime
error: type for self is invalid
error: Couldn't realize Swift AST type of self. Hint: using `v` to directly inspect variables and fields may still work.`
(lldb) v System.elapsedTime
warning: Cannot load Swift type information for /Users/finnvoorhees/Developer/Playdate/PlaydateKitTemplate/.build/plugins/PDCPlugin/outputs/PlaydateKitTemplate.pdx/pdex.dyliberror: module 'Swift' cannot be imported in embedded Swift modeerror: no variable or instance variable named 'System' found in this frame