JIT Debugging

Browse docs

A common pattern for developers using LuaJIT is to maximize the amount of lua code that can be JIT compiled for performance.

The profiler is a good starting point, but it isn’t super specific due to its minimal overhead.

Typical LuaJIT developers will use the -jv flag (jit verbose) which will hook into the JIT compiler and print when it fails and why.

This functionality is also exposed by lde with the --jit flag:

lde run --jit

This will run your code and print to your console whenever a function fails to compile, giving you a brief location and reason.

JIT Debugging

When your program terminates, it will give you a complete overview of all of these fails alongside syntax highlighted locations where they occurred.

JIT End