![]() This may require updating a system or project Spring configuration file to load the debugger into every process forked by Spring. (Optional) RubyMine allows you to debug Rails applications with Spring. In this part, we'll install the debugging gems and start a debugging session on the remote machine. Now we are ready to attach to a remote process and debug the application. Remote Path: /home/deploy/sample_rails_appĬlick OK in this dialog and then click OK in the Settings dialog. Local Path: /Users/jetbrains/RubymineProjects/sample_rails_app In our case, the paths will look as follows: ![]() If necessary, you may specify not project root paths but only folders containing sources required for debugging. In the Edit Project Path Mappings dialog, specify the local and remote project root paths. To do this, click the Edit Path Mappings button. The final thing you need to do is to specify mappings between files of a local and remote project. In this step, you need to choose the interpreter used to run a remote application.Ĭlick OK and select the added SDK in the Ruby SDK and Gems page. If you specified a path to the version manager executable in the previous dialog, RubyMine suggests selecting the required Ruby interpreter. In this tutorial, we use rbenv on a remote machine.Īfter you have specified all the settings, click OK. Ruby or version manager path: Here you should specify the path to the Ruby interpreter or the version manager executable. SSH configuration: Click the ellipsis button to create an SSH configuration for connecting to a remote machine. In the invoked dialog, select SSH Credentials and specify parameters in the following way: Open the Settings dialog Ctrl+Alt+S, go to the Language & Frameworks | Ruby SDK and Gems page, click the button and select Remote Interpreter or Version Manager from the list: In this part, we’ll configure a remote interpreter using SSH. The $COMMAND$ part will be replaced with the actual command for running the application.Ĭlick OK in the Run/Debug Configurations dialog. It will be used later to start the debugger on a remote machine. Local root folder: Specify an application's root folder on the local machine.Įxample: /Users/jetbrains/RubymineProjects/sample_rails_appĪfter you've specified all the settings, copy the command generated in the Server command field to the clipboard. Local port: Specify a local port used to establish a connection between the IDE and debugger. Remote root folder: Specify a root folder on the remote machine, where the application to be debugged is located.Įxample: /home/jetbrains/apps/sample_rails_app Remote port: Specify a remote port used to establish a connection between the IDE and debugger. Remote host: Specify a hostname or IP address of the remote machine.Įxamples: sample-web-server, 172.30.163.90 Name: Enter a run/debug configuration name. Go to Run | Edit Configurations from the main menu, click, and select Ruby remote debug from the list. Create the 'Ruby remote debug' configurationĪt first, let's create and set up the Ruby remote debug configuration in RubyMine: ![]() On both machines, we’ll use the jetbrains user’s home directories to store source code. In our tutorial, the remote computer has the sample-web-server name. Remote machine: The Ubuntu machine with enabled SSH access and the Ruby interpreter installed. Local machine: Mac with macOS, with RubyMine installed. In this tutorial, we'll use two machines to demonstrate debugging of the remote application: In this tutorial, we'll show you how to debug a sample Rails application using Ruby remote debug. In such cases, you can use the Ruby remote debug run/debug configuration. ![]() The specified ways may not suit for debugging some projects, for example, SketchUp. Run the application on the remote machine, add a remote Ruby interpreter, configure mappings, and attach to a running process. RubyMine offers you two ways to debug applications that are run on the remote machine:Īdd a remote Ruby interpreter, configure mappings between files of the local and remote project, and start a debugging session. Tutorial: Debug an application using 'Ruby remote debug'
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |