erlyberly
erlyberly copied to clipboard
Show record and record field names in function traces
At the moment erlyberly highlights record and record field names in process state and for certain function patterns used by OTP behaviours where it is likely that a record is used. It would be great to have highlighting for records anywhere they're used.
![screen shot 2015-11-15 at 02 09 00](https://cloud.githubusercontent.com/assets/213455/11166796/273aebde-8b3e-11e5-9242-76f1584a1162.png)
To do this in erlyberly we could do the following:
- On a trace, decompile the module to AST.
- Find dialyzer specs for functions which have records in the arguments or results and put them in an ets table to be checked when a trace comes in.
- Compile record data in the module and put it into an ets table.
- When a trace comes in, check if the function is in the ets containing record functions, pull the record info and convert the record so that it contains meta data like the process state does right now.
The record and function data needs to be deleted and rebuilt when the module is reloaded.
Only erlang is required for this change.