Skip to content

Ability to add original filepath/lineNo on call to methods with [CallerFilePath] and alike attributes #195

@builder-main

Description

@builder-main

It seems doable to manually rewrite outputs so that methods with caller attributes can redirect to original file
Said method example

public static void Trace(string module, string message, UnityEngine.Object extraInfo, [CallerMemberName] string methodName = null, [CallerFilePath] string fileName = null, [CallerLineNumber] int lineNo = -1, bool stacktrace = false)
//Original file myFile.cs - Right now rewrites leaves it as is
1203: Logger.Debug("Test", "Go here", gameObject);

//Proposed feature "Rewrite caller attributes"
1267 : Logger.Debug("Test", "Go here", gameObject, "CallerMethod", "Path/To", "myFile.cs", 1203);

This would streamline development process so one could jump back to hotreloaded files easily.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or requestuser-code-rewriteRelates to code rewrite that tool performs on user code to make it compilable / redirect-ready

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions