# How to set up F# development in visual studio code

**URL:** <https://forums.fsharp.org/t/how-to-set-up-f-development-in-visual-studio-code/1125>\
**Category:** General\
**Tags:** editorsupport\
**Created:** [December 13, 2019, 2:37am UTC](https://forums.fsharp.org/t/how-to-set-up-f-development-in-visual-studio-code/1125 "2019-12-13T02:37:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Helicon](https://avatars.discourse-cdn.com/v4/letter/h/4491bb/32.png) [@Helicon](https://forums.fsharp.org/u/Helicon)\
**Post date:** [December 13, 2019, 2:37am UTC](https://forums.fsharp.org/t/how-to-set-up-f-development-in-visual-studio-code/1125/1 "2019-12-13T02:37:42Z")

</div>

Hi All.

I am a C# developer and I am currently trying to pick up F# which I see a lots of potential in it. However, I am not able to set up the F# development environment in Visual Studio Code as in I am not sure which configuration should i add in the launch.json

any help is appreciated.

Best regards,  
Helicon

---

<div class="post-metadata">

**Author:** ![DaveShaw](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/daveshaw/32/1225_2.png) [@DaveShaw](https://forums.fsharp.org/u/DaveShaw)\
**Post date:** [December 13, 2019, 9:56am UTC](https://forums.fsharp.org/t/how-to-set-up-f-development-in-visual-studio-code/1125/2 "2019-12-13T09:56:05Z")

</div>

I’ve just realised that I’ve never done this before.

Here’s what I did just now to debug a .NET Core console F# app - you should be able to adjust as necessary.

* * *

Pre-requisites:

- In VS Code - I have the Ionide F# and the Microsoft C# extension.
- I’m using .NET Core 3.1 SDK.

To get started ran the following on the command line:

```auto
> cd AProject
> dotnet new console -lang f#
> code .

```

Once in VS Code I just pressed **F5** , and when prompted for an “Environment” I selected “.NET Core”

This opened me a launch.json like so:

```auto
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": []
}

```

At the bottom right of the editor I clicked “Add Configuration”:

![image](https://canada1.discourse-cdn.com/flex030/uploads/fsharp/original/1X/45a6ec8bb0c549a2190f1cee2d26b3a7b68a5521.png)  
and selected “.NET: Launch .NET Core Console App”

I then had to update the “program” to point to the framework and assembly name. In my case:

```auto
//Changing
"program": "${workspaceFolder}/bin/Debug/<target-framework>/<project-name.dll>",
//to
"program": "${workspaceFolder}/bin/Debug/netcoreapp3.1/AProject.dll",

```

I then pressed F5 again and when prompted about a missing “build” task I clicked “Configure Task”:

![image](https://canada1.discourse-cdn.com/flex030/uploads/fsharp/original/1X/bc75264cbbf4d9ff3b695b6a063df16655dd7e46.png)  
Then I selected “Create tasks.json file from template”, then selected the “.NET Core” template.

Now when I press F5 it launches the app with the debugger attached:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/fsharp/original/1X/a55c578b36400f236dc6c1e114e1b9dbaf9f8172.png)

* * *

As I said, at the start, I’d not done this before, usually I’m just writing scripts in F# and using the REPL to run them. Or I just use `dotnet run` from the terminal, one of the things I like about F# and functional programming is that I spend a lot less time debugging code than I do with C#.

---

<div class="post-metadata">

**Author:** ![Helicon](https://avatars.discourse-cdn.com/v4/letter/h/4491bb/32.png) [@Helicon](https://forums.fsharp.org/u/Helicon)\
**Post date:** [December 13, 2019, 6:04pm UTC](https://forums.fsharp.org/t/how-to-set-up-f-development-in-visual-studio-code/1125/3 "2019-12-13T18:04:29Z")

</div>

Hi Dave,

Thanks for such detail guide! I finally managed to get it running in visual studio code!

Really appreciate your input.

Best regards,  
Helicon

---

<div class="post-metadata">

**Author:** ![isaacabraham](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/isaacabraham/32/52_2.png) [@isaacabraham](https://forums.fsharp.org/u/isaacabraham)\
**Post date:** [December 13, 2019, 6:17pm UTC](https://forums.fsharp.org/t/how-to-set-up-f-development-in-visual-studio-code/1125/4 "2019-12-13T18:17:35Z")

</div>

We also created a short video series here which might be useful for you! [https://www.youtube.com/playlist?list=PLlzAi3ycg2x0TScJb7czq7-4LrQoyTB0I](https://www.youtube.com/playlist?list=PLlzAi3ycg2x0TScJb7czq7-4LrQoyTB0I)

It’s a little out of date now because netcore now supports FSI but otherwise it should be useful!

---

<div class="post-metadata">

**Author:** ![Jonathan](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/jonathan/32/1359_2.png) [@Jonathan](https://forums.fsharp.org/u/Jonathan)\
**Post date:** [March 7, 2025, 8:12am UTC](https://forums.fsharp.org/t/how-to-set-up-f-development-in-visual-studio-code/1125/5 "2025-03-07T08:12:54Z")

</div>

Hi, this is quite an old post, so I want to ask, because I am having trouble with it (and google brings me here).

Is this still be best method to get F# debugging in VS Code?  
Thanks.

---

<div class="post-metadata">

**Author:** ![Tbobbe](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/tbobbe/32/1285_2.png) [@Tbobbe](https://forums.fsharp.org/u/Tbobbe)\
**Post date:** [March 7, 2025, 10:23am UTC](https://forums.fsharp.org/t/how-to-set-up-f-development-in-visual-studio-code/1125/6 "2025-03-07T10:23:40Z")

</div>

Hi Jonathan!

What seems to be the trouble?  
Should be even easier to get it up and running nowadays!

I did the following just now:

1. Have the _Ionide for F#_ extension installed in VS Code. Make sure you also have the requirements for the extension to work (see the _Ionide for F#_ extension page in VS Code):  

2. Create your project in the terminal and open it in VS Code:

```ps
> dotnet new console -lang "F#" -o TestProj 
> cd TestProj
> code .

```

1. Make some changes, set a breakpoint and press the green play button  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/fsharp/original/2X/2/2d70dff90b317d006992fa48c1153efca2ebae0c.png)

And we’re up and debugging 😃

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/fsharp/original/2X/8/882e4cc42223543169086c6c48d39fb2ca3cfcbf.png)

Hope it works out for you! ^^

---

<div class="post-metadata">

**Author:** ![Jonathan](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/jonathan/32/1359_2.png) [@Jonathan](https://forums.fsharp.org/u/Jonathan)\
**Post date:** [March 10, 2025, 4:29am UTC](https://forums.fsharp.org/t/how-to-set-up-f-development-in-visual-studio-code/1125/7 "2025-03-10T04:29:47Z")

</div>

I will try this, thank you 👍
