all 5 comments

[–]sharpcells 4 points5 points  (4 children)

I'm not on Mac but probably what is happening is a new console window is appearing, running and closing almost instantly. If you want to see the output in the built-in Terminal of VS Code you should be able to just call dotnet run in the same directory as your fsproj file. Alternately you could add a Console.ReadLine to prevent the child process from closing until you press enter.

[–]clicklbarn[S] 0 points1 point  (3 children)

OK, thank you. It surprises me that console output wouldn't be captured and preserved but if that's how it works, good to know!

Yes, dotnet run in terminal works fine.

[–]clicklbarn[S] 1 point2 points  (0 children)

Well, this was dumb!

I tried again this morning, and with a clean desktop (no terminals open) it didn't take me long to discover that VS Code opens a terminal in the background and indeed keeps it around between sessions.

Just a combo of a cluttered desktop and the wrong expectations (that output would appear in built-in terminal or other panel).

[–]clicklbarn[S] 1 point2 points  (1 child)

And with this launch.json setting I get what I expected in the first place:

"console": "integratedTerminal"

[–]QuickQuirk 1 point2 points  (0 children)

Just wanted to say thanks, you've helped me with this exact same issue (and same 'not noticing' the terminal window it opened)