Skip to content

Cannot debug FSI with net 7 or .net framework in Visual Studio 2022 17.6.0 preview 2 #15820

Closed

Description

@smoothdeveloper

For a while I haven't been able to debug scripts either by attaching to fsianycpu.exe or using the right click item on the F# interactive panel.

let xs = [1..100]

for i in xs do
  printfn $"{i}"

I am still able to step through code of loaded assemblies.

image
image

Microsoft Visual Studio Community 2022
Version 17.6.0 Preview 2.0
VisualStudio.17.Preview/17.6.0-pre.2.0+33513.286
Microsoft .NET Framework
Version 4.8.09032

Installed Version: Community

ASP.NET and Web Tools 17.6.204.15292
ASP.NET and Web Tools

Azure App Service Tools v3.0.0 17.6.204.15292
Azure App Service Tools v3.0.0

C# Tools 4.6.0-2.23151.17+1314d090671dc1a1500c5303c4b5ae9150f40d98
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

NuGet Package Manager 6.6.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

Syntax Visualizer 1.0
An extension for visualizing Roslyn SyntaxTrees.

TypeScript Tools 17.0.20302.2003
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools 4.6.0-2.23151.17+1314d090671dc1a1500c5303c4b5ae9150f40d98
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools 17.6.0-beta.23126.1+4de2393866be1be6fa35af544c6f25a10af5ab3d
Microsoft Visual F# Tools

Visual Studio IntelliCode 2.2
AI-assisted development for Visual Studio.

related: #14453

Activity

  1. added this to the Backlog milestone on Aug 18, 2023
  2. T-Gro commented on Aug 21, 2023

    @T-Gro
    Member

    If you are on Version 17.6.0 Preview 2.0, can you please try in the latest preview?
    The script debugging was fixed by Kevin earlier this year, this does look similar to it.

  3. smoothdeveloper commented on Aug 21, 2023

    @smoothdeveloper
    ContributorAuthor

    I'm still seeing the same with Version 17.8.0 Preview 1.0

  4. smoothdeveloper commented on Sep 1, 2023

    @smoothdeveloper
    ContributorAuthor

    @T-Gro, can I get confirmation this doesn't need a repro and that it also fail to debug on your end?

  5. T-Gro commented on Sep 1, 2023

    @T-Gro
    Member

    Yep, it also fails to debug on latest code from main.

  6. smoothdeveloper commented on Sep 11, 2023

    @smoothdeveloper
    ContributorAuthor

    Related: #5457

  7. 7 remaining items

  8. blfuentes commented on Oct 15, 2023

    @blfuentes

    This should be fixed in 17.8 when it arrives.

    Recording.2023-10-14.165437.mp4

    thanks!

  9. blfuentes commented on Nov 25, 2023

    @blfuentes

    This should be fixed in 17.8 when it arrives.

    Recording.2023-10-14.165437.mp4

    Seems it's nof fixed yet.
    I'm running 17.8.1 with net 8 and still cannot debug FSI. I continue getting
    image

  10. majocha commented on Jan 2, 2024

    @majocha
    Contributor

    Same here. I had to resort to printf for debugging 😭

  11. KevinRansom commented on Jan 4, 2024

    @KevinRansom
    Contributor

    So ... script debugging works for me if I disable "Just My Code". Did you give that a try?

    Untitled.video.mp4
  12. blfuentes commented on Jan 4, 2024

    @blfuentes

    So ... script debugging works for me if I disable "Just My Code". Did you give that a try?
    Untitled.video.mp4

    Yes, I tried with the just my code disabled and I could set breakpoints but the watcher doesn't work:
    image

  13. majocha commented on Jan 4, 2024

    @majocha
    Contributor

    Same, @blfuentes. No locals, no watch, no values on hover, on call stack.
    With "Just my code" disabled I can step through code, which is at least something.

  14. KevinRansom commented on Jan 4, 2024

    @KevinRansom
    Contributor

    @majocha, yes, locals, watch and values haven't worked for quite a while, we haven't got around to figuring out why - reasons, other issues mainly. #14572

  15. self-assigned this
    on Jan 4, 2024
  16. KevinRansom commented on Jan 4, 2024

    @KevinRansom
    Contributor

    I think we can close this right? we will manage the variables issue with this: #14572

  17. smoothdeveloper commented on Mar 13, 2024

    @smoothdeveloper
    ContributorAuthor

    I'm trying this again (have to demo fsx scripting to client), and reading to uncheck "Just My Code", as out of box, it doesn't work.

    The issue I see is, I'm stepping through the FSI interpreter now, I don't think my client or F# script users wants to see this.

    Is there a sense that things should work without "Just My Code" being unchecked, just out of the box (after setting the debugging option for F# Interactive being set)?

  18. smoothdeveloper commented on Mar 13, 2024

    @smoothdeveloper
    ContributorAuthor
    image

    I mean, it is an excellent tactic to bring more developers, to contribute to this repository 🙂 but I think it will confuse end users basically.

    Also, the fact that "Just My Code" has to be unchecked isn't obvious at all to figure out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions