Skip to content

Suggestion: code map files #233

Open
@NanoBob

Description

@NanoBob

This isn't as much an issue as it is a suggestion.

Would it be possible to generate some form of code maps? By this I mean a file which would contain which lines of Lua code correspond to which lines of C# code, and which Lua file corresponds to which C# file.

My reasoning behind a feature like this would be so we could show errors with proper file names and line nubers in the C# files, even when thrown at runtime from Lua.

So basically something like:

{
    "Dist/Models/Player.lua": {
        "name": "Source/Models/Player.cs",
        "lines": [
            0,  // line 0 in Lua refers to line 0 in C# 
            1,  // line 1 in Lua refers to line 1 in C#
            2,  // line 2 in Lua refers to line 2 in C#
            3,  // line 3 in Lua refers to line 3 in C#
            4,  // line 4 in Lua refers to line 4 in C#
            4,  // line 5 in Lua refers to line 4 in C#
            5   // line 6 in Lua refers to line 5 in C#
        ]
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions