Skip to content

Debugging support #18

@SeeminglyScience

Description

@SeeminglyScience

The largest hurdle towards using PSLambda for anything outside of interactive use is lack of ability to debug. From a glance it doesn't look easy. The LambdaExpression.Compile method does take a DebugInfoGenerator object as a parameter, but it looks like that can only mark sequence points for LambdaExpressions. In a quick search I haven't found a way to use the DebugInfoExpression throughout the expression tree.

A last resort would be to implement my own stack spiller and translate the expression tree into IL. As much as I would absolutely love to do that, maintainability would be quite difficult. That would however also make some things like async/await, class definitions, and yield enumerables significantly easier to implement.

All of that assumes that the C# vscode extension can even handle being directed at a .ps1 file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions