Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Autos window #4271

Open
Tracked by #12812
cmeeren opened this issue Jan 26, 2018 · 3 comments
Open
Tracked by #12812

Add support for Autos window #4271

cmeeren opened this issue Jan 26, 2018 · 3 comments
Labels
Area-Debug stepping, debug points, stacks and more Feature Request
Milestone

Comments

@cmeeren
Copy link
Contributor

cmeeren commented Jan 26, 2018

According to the VS2017 docs (and observed in practice), the Autos window does not work in F#. I suggest adding support for the Autos window. It's a great help in C# and VB debugging, and while I spend far less time debugging with F# and functional architectures makes debugging generally easier, the (lack of) tooling makes some aspects of F# debugging more painful than it needs to be. The Autos window could alleviate some of that pain.

@cartermp cartermp added Feature Request Area-Debug stepping, debug points, stacks and more labels Jan 26, 2018
@cartermp cartermp added this to the Unknown milestone Aug 25, 2018
@xperiandri
Copy link
Contributor

Great idea.
Maybe @Pilchie or @dsyme can point to Roslyn implementation?

@Pilchie
Copy link
Member

Pilchie commented Sep 13, 2018

@dsyme
Copy link
Contributor

dsyme commented Nov 19, 2021

From the C# source code:

    /// Given a position in a source file, returns the expressions in close proximity that should
    /// show up in the debugger 'autos' window.  In general, the expressions we place into the autos
    /// window are things that appear to be 'side effect free'.  Note: because we only use the syntax
    /// tree for this, it's possible for us to get this wrong.  However, this should only happen in
    /// code that behaves unexpectedly.  For example, we will assume that "a + b" is side effect free
    /// (when in practice it may not be).  
    /// 
    /// The general tactic we take is to add the expressions for the statements on the
    /// line the debugger is currently at.  We will also try to find the 'previous' statement as well
    /// to add the expressions from that.  The 'previous' statement is a bit of an interesting beast.
    /// Consider, for example, if the user has just jumped out of a switch and is the statement
    /// directly following it.  What is the previous statement?  Without keeping state, there's no way
    /// to know.  So, in this case, we treat all 'exit points' (i.e. the last statement of a switch
    /// section) of the switch statement as the 'previous statement'.  There are many cases like this
    /// we need to handle.  Basically anything that might have nested statements/blocks might
    /// contribute to the 'previous statement'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Debug stepping, debug points, stacks and more Feature Request
Projects
Status: New
Development

No branches or pull requests

5 participants