Skip to content

Commit c2f0031

Browse files
committed
Fix macOS debugging, which needs to use the hl executable directly instead of Lime's custom shell script for .app bundles
Note: This works on Intel only. The HashLink ecosystem does not yet fully support ARM64. On ARM64, I was able to verify that the hashlink-debugger extension will correctly detect the HL version and its codesign entitlements. It reports errors, if necessary. If all checks pass, it crashes because it cannot debug Intel executables, even with Rosetta.
1 parent a4d3bbd commit c2f0031

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

src/lime/extension/Main.hx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,17 @@ class Main
988988

989989
if (limeVersion >= new SemVer(8, 0, 0))
990990
{
991-
config.hl = Path.join([getProjectDirectory(), outputFile]);
991+
switch (Sys.systemName())
992+
{
993+
case "Mac":
994+
// on macOS only, Lime's output file is a shell
995+
// script that calls the hl executable.
996+
// for debugging, we should bypass the shell script
997+
// and launch the hl executable directly.
998+
config.hl = Path.join([getProjectDirectory(), Path.directory(outputFile), "hl"]);
999+
default:
1000+
config.hl = Path.join([getProjectDirectory(), outputFile]);
1001+
}
9921002
}
9931003
else
9941004
{

0 commit comments

Comments
 (0)