Compare commits
No commits in common. "fc7bff4c68b17708cfb4b8aedcff5f730ee98502" and "427953c5f84933d1c90da921b28b5597f4d2b4cb" have entirely different histories.
fc7bff4c68
...
427953c5f8
|
@ -1,5 +1,6 @@
|
||||||
# Debugging on OSX
|
# Debugging on OSX
|
||||||
|
|
||||||
|
**TODO: Figure out how to set breakpoints in Xcode**
|
||||||
**TODO: Figure out why Xcode detaches from the process after you take a Metal snapshot, leavin the window there forever**
|
**TODO: Figure out why Xcode detaches from the process after you take a Metal snapshot, leavin the window there forever**
|
||||||
|
|
||||||
## Basics
|
## Basics
|
||||||
|
@ -15,15 +16,20 @@
|
||||||
Debugging this way, you can have Xcode run an executable in a .app or just from any directory. There do seem to be differences in the ways some graphics systems are initialized - I get different window scaling in each case.
|
Debugging this way, you can have Xcode run an executable in a .app or just from any directory. There do seem to be differences in the ways some graphics systems are initialized - I get different window scaling in each case.
|
||||||
|
|
||||||
### Breakpoints
|
### Breakpoints
|
||||||
|
_I can't get these to be set via the Xcode Debugger at the moment. I'm not sure why. As an alternative, you can set them via the lldb command line interface in Xcode, and then navigate the stack with the UI just fine._
|
||||||
|
|
||||||
To get breakpoints to work, you have to tell Xcode to treat your .jai files as source code.
|
**To set on a particular file/line**
|
||||||
|
|
||||||
1. Right click your file.
|
`b --file <file_name> --line <line_number>`
|
||||||
2. Select show file inspector.
|
|
||||||
3. In the Inspector, change Type from "Default - Plain Text" to "C Source"
|
|
||||||
|
|
||||||
You should now be able to set breakpoints in that file.
|
**To set at the entry to a particular function**
|
||||||
As far as I can tell, there isn't a convenient way to set all .jai files to be loaded as C Source files so you have to do this individually.
|
|
||||||
|
`b <function_name>`
|
||||||
|
_Note: this doesn't work if function_name is "main" - it adds a baker's dozen of breakpoints at different places_
|
||||||
|
|
||||||
|
**To remove all breakpoints**
|
||||||
|
|
||||||
|
`breakpoint delete`
|
||||||
|
|
||||||
## Graphics
|
## Graphics
|
||||||
|
|
||||||
|
|
|
@ -2,23 +2,7 @@
|
||||||
This is heavily based (read: copy pasted + some modifications) on Thekla's module
|
This is heavily based (read: copy pasted + some modifications) on Thekla's module
|
||||||
MacOS_Bundler.jai, released with the jai compiler.
|
MacOS_Bundler.jai, released with the jai compiler.
|
||||||
|
|
||||||
For usage code, see package_macos_example.jai
|
Usage:
|
||||||
|
|
||||||
This routine creates a .app file with the following structure:
|
|
||||||
|
|
||||||
output_path/
|
|
||||||
Entitlements.xcent
|
|
||||||
<output_name>.app/
|
|
||||||
Contents/
|
|
||||||
Info.plist
|
|
||||||
MacOS/
|
|
||||||
<output_name> <-- the executable, copied from args.exe_path
|
|
||||||
...copied in args.dynamic_libs
|
|
||||||
Resources/
|
|
||||||
icon_data.icns
|
|
||||||
...the contents of args.asset_directory
|
|
||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import "Basic";
|
#import "Basic";
|
||||||
|
|
Loading…
Reference in New Issue