JetBrains Rider 2024.1 Help

Run and debug .NET projects of executable types

You can run and debug .NET projects of executable types (for example, Console Application) the same way as you run other project types — by configuring the project startup properties in a run configuration and then launching this configuration with the debugger attached Shift+F9 or without debugging Shift+F10.

By default, JetBrains Rider creates a necessary run configuration when you create or first open a project of executable type. You can customize this configuration or add more configurations of the same type for different launch scenarios.

Create a run configuration for .NET project

  1. Open the Run/Debug Configuration dialog in one of the following ways:

    • Select Run | Edit Configurations from the main menu.

    • With the Navigation bar visible (View | Appearance | Navigation Bar), choose Edit Configurations from the run/debug configuration selector.

    • Press Alt+Shift+F10 and then press 0.

  2. In the Run/Debug Configuration dialog, click Add New Configuration Add New Configuration Alt+Insert, choose the .NET Project configuration type, and specify a name that will help you identify this configuration in the future.

  3. Optionally, adjust the common settings of the configuration and configure before launch tasks.

  4. Choose a startup project of executable type.

  5. In Target framework, select a .NET framework version that will be used to run this configuration.

  6. The path to the executable file of the selected target project is calculated automatically, but you can change it if needed.

  7. Optionally, specify program arguments that will be passed to the executable when the configuration is started. Multiple arguments should be separated with whitespaces.

    For some project types (for example, Web Application), JetBrains Rider will fill this field automatically so that the target project could be started correctly.

  8. Optionally, specify a custom working directory, otherwise the directory of the target executable will be used.

  9. Optionally, specify custom environment variables for the target executable in the following format:

  10. Optionally, specify .NET runtime arguments. Multiple arguments should be separated with whitespaces.

    Both .NET and Mono support setting custom runtime arguments when launching an application. For example, Mono supports many runtime arguments to customize how your application is run. You can select the garbage collector to be used (--gc=boehm or --gc=sgen), on macOS you can select the runtime architecture to be used (--arch=32 or --arch=64), and more.

  11. Optionally, use the Runtime selector to choose one of the runtimes available on your machine.

    If you are working on Windows, you can check how your application works with the Mono runtime. JetBrains Rider will use the Mono executable specified on the Build, Execution, Deployment | Toolset and Build page of JetBrains Rider settings Ctrl+Alt+S.

    To debug with Mono runtime, you need:

    • Mono 4.2+

    • Portable PDB in your projects — <debugtype>portable</debugtype> in the .csproj file, or alternatively, generate mdb with pdb2mdb.

  12. By default, the output of .NET and Mono applications is shown in the Run or Debug window. You can select Use external console to show the output in an external window.

    Note that this checkbox does not affect classic .NET application types (for example, .NET Console Application) — their output in always shown in an external window.

  13. Click Apply to save the configuration.

Launch browser for a Web application

In the Open browser section of the configuration settings, you can configure the behaviour of the browser and enable debugging the client-side code of the application. This functionality is provided through a JavaScript Debug run configuration, so technically, JetBrains Rider creates separate run configurations for the server-side and the client-side code, but you specify all your settings in one dedicated .NET Project run configuration.



Open browser

In the field in this area, specify a project HTML file to create a correct URL to this file according to the project root to be started on the built-in web server. For example, if you choose project_root/inner_folder/index.html the resulting URL will be http://localhost:63342/project_root/inner_folder/index.html. If you select the After Launch checkbox, the browser will open this page automatically after the application starts. Alternatively you can view the same result by opening the page with this URL address in the browser of your choice manually.

After launch

Select this checkbox to automatically open the browser. From the list, select the browser to use:

  • To use the system default browser, select Default.

  • To use a custom browser, select it from the list. Note that debugging of JavaScript client-side code is only supported in Google Chrome and in other Chromium-based browsers.

  • To configure browsers, click the Browse button and adjust the settings in the Web Browsers and Preview dialog that opens. For more information, refer to Configure browsers.

with JavaScript debugger

Select this checkbox to enable debugging the client-side code in the selected browser.

Last modified: 11 February 2024