Skip to content

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

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

Closed
smoothdeveloper opened this issue Aug 18, 2023 · 17 comments
Assignees
Milestone

Comments

@smoothdeveloper
Copy link
Contributor

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

@T-Gro
Copy link
Member

T-Gro commented Aug 21, 2023

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.

@smoothdeveloper
Copy link
Contributor Author

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

@smoothdeveloper
Copy link
Contributor Author

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

@T-Gro
Copy link
Member

T-Gro commented Sep 1, 2023

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

@smoothdeveloper
Copy link
Contributor Author

Related: #5457

@blfuentes
Copy link

Any news regarding this? I'm trying to debug some fsi and it shows me this window:
image

@KevinRansom
Copy link
Contributor

This should be fixed in 17.8 when it arrives.

Recording.2023-10-14.165437.mp4

@blfuentes
Copy link

This should be fixed in 17.8 when it arrives.

Recording.2023-10-14.165437.mp4

thanks!

@blfuentes
Copy link

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

@majocha
Copy link
Contributor

majocha commented Jan 2, 2024

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

@KevinRansom
Copy link
Contributor

KevinRansom commented Jan 4, 2024

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

Untitled.video.mp4

@blfuentes
Copy link

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

@majocha
Copy link
Contributor

majocha commented Jan 4, 2024

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.

@KevinRansom
Copy link
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

@KevinRansom KevinRansom self-assigned this Jan 4, 2024
@KevinRansom KevinRansom modified the milestones: October-2023, January-2024 Jan 4, 2024
@KevinRansom
Copy link
Contributor

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

@smoothdeveloper
Copy link
Contributor Author

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)?

@smoothdeveloper
Copy link
Contributor Author

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
Projects
Archived in project
Development

No branches or pull requests

6 participants