JetBrains Rider 2023.3 Help

F# Interactive

Enable the F# Support plugin

This functionality relies on the F# Support plugin, which is bundled and enabled in JetBrains Rider by default. If the relevant features aren't available, make sure that you didn't disable the plugin.

  1. Press Ctrl+Alt+S to open the IDE settings and then select Plugins.

  2. Open the Installed tab, find the F# Support plugin, and select the checkbox next to the plugin name.

To enable F# interactive on your computer:

  • Install Visual Studio Build Tools 2017 or later, with F# compiler enabled on the Individual components tab. If you already have VS Build Tools or Visual Studio 2017 or later, you can run the installer to modify the installation and choose to install the F# compiler.

    JetBrains Rider: F# compiler in Visual Studio Build Tools
  • F# Interactive relies on the F# Support plugin. The plugin comes bundled with JetBrains Rider, but if you observe any malfunction, make sure that the plugin is enabled on the Plugins page of the IDE settings  Ctrl+Alt+S.

  • Install the latest stable Mono: https://www.mono-project.com/download/stable/.

  • F# Interactive relies on the F# Support plugin. The plugin comes bundled with JetBrains Rider, but if you observe any malfunction, make sure that the plugin is enabled on the Plugins page of the IDE settings  Ctrl+Alt+S.

  • Install the fsharp package as described here: https://fsharp.org/use/linux/.

  • F# Interactive relies on the F# Support plugin. The plugin comes bundled with JetBrains Rider, but if you observe any malfunction, make sure that the plugin is enabled on the Plugins page of the IDE settings  Ctrl+Alt+S.

JetBrains Rider includes a Read–Eval–Print Loop (REPL), which lets you experiment with F# code without compiling it.

Start a new F# Interactive session

  • Select a block of code in the editor and press Ctrl+\ or alternatively choose Tools | F# Interactive | Send Selection to F# Interactive from the main menu.

    JetBrains Rider will start a new interactive session in a new tab of the Run window and send the selected code to this session. If a F# interactive session is already running, the selected code will be appended to this session.

  • Choose Tools | F# Interactive | Start New F# Interactive Session from the menu.

    In this case, JetBrains Rider will open an empty interactive session and reset the current F# interactive session if it is already running. You can also clear the current session at any time by clicking Reset on the toolbar.

As soon as the F# Interactive is started, you can write any F# expressions and evaluate them by pressing Enter.

JetBrains Rider: F# Interactive in action

F# Interactive will attempt to compile your code and execute it if successful. Otherwise the interpreter will return the error messages.

All expressions that you execute during the session are recorded in history. To find a previously executed statement, use the Up/Down buttons or copy any recently executed command:

JetBrains Rider: F# Interactive. Set recent command

To have the copied command executed at once, uncheck Copy recent commands to Interactive editor on the Languages & Frameworks | F# Interactive page of JetBrains Rider settings Ctrl+Alt+S.

Last modified: 21 March 2024