{"id":45907,"date":"2015-06-02T19:40:53","date_gmt":"2015-06-02T16:40:53","guid":{"rendered":"https:\/\/www.altoros.com\/blog\/?p=45907"},"modified":"2019-08-09T17:37:38","modified_gmt":"2019-08-09T14:37:38","slug":"how-to-remotely-debug-cloud-foundry-apps","status":"publish","type":"post","link":"https:\/\/www.altoros.com\/blog\/how-to-remotely-debug-cloud-foundry-apps\/","title":{"rendered":"How to Remotely Debug Cloud Foundry Apps"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2019\/08\/how-to-remotly-debug-cloud-foundry-apps.jpg\" alt=\"How to remotly debug Cloud Foundry applications\" width=\"240\" style=\"margin: 15px\" class=\"alignright size-full wp-image-45908\" \/><\/p>\n<p>When using Cloud Foundry for deploying apps, one might expect that all the test suites will run painlessly, and what works in development\/testing\/staging will work in production. However, what if it won\u2019t? What if it is impossible to replicate those conditions in a non-production environment? Here, remote debugging comes to the rescue.<\/p>\n<p>In this blog post, we provide guidelines on how to remotely debug Ruby and Java applications deployed with Cloud Foundry.<\/p>\n<p>&nbsp;<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_79_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.altoros.com\/blog\/how-to-remotely-debug-cloud-foundry-apps\/#General_considerations\" >General considerations<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.altoros.com\/blog\/how-to-remotely-debug-cloud-foundry-apps\/#Getting_a_suitable_IPport_combination\" >Getting a suitable IP\/port combination<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.altoros.com\/blog\/how-to-remotely-debug-cloud-foundry-apps\/#Remotely_debugging_Java_applications\" >Remotely debugging Java applications<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.altoros.com\/blog\/how-to-remotely-debug-cloud-foundry-apps\/#Remotely_debugging_Ruby_applications\" >Remotely debugging Ruby applications<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.altoros.com\/blog\/how-to-remotely-debug-cloud-foundry-apps\/#Further_reading\" >Further reading<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"General_considerations\"><\/span>General considerations<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Remote debugging implies connecting to the application server from your local environment and setting up breakpoints, inspecting variables and diagnosing the issue that is hurting the application. This way, you don\u2019t need to SSH into the server itself, just connect your remote debugger and start working on it.<\/p>\n<p>The debugging processes for Java and Ruby apps differ a bit. We\u2019ll start with Java and explain how to get a suitable IP\/port combination (to execute a remote debugger), set up an IDE, and get the app server-ready. For a Ruby app, we\u2019ll demonstrate how to set up an IDE, modify a Gemfile and <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">manifest.yml<\/code>, and use the Pry gem as an alternative to the classical IDE debugger.<\/p>\n<p>Still, there are some things you need to check on:<\/p>\n<ul>\n<li style=\"margin-bottom: 6px;\">Make sure that you have exactly the same code version in your IDE\/local box and in your remote server.<\/li>\n<li style=\"margin-bottom: 6px;\">Open the necessary ports in your computer and\/or router (see the next section).<\/li>\n<li style=\"margin-bottom: 6px;\">If the remote debug fails, you can always inspect the logs with <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">cf logs --recent<\/code> to see what went wrong.<\/li>\n<li style=\"margin-bottom: 6px;\">Make sure that you set the number of instances to 1 in your <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">manifest.yml<\/code>. If you set it to more than 1, many instances will try to connect to your debugger, which is not possible.<\/li>\n<li style=\"margin-bottom: 6px;\">Install OpenSSL in your local box if you still don\u2019t have it.<\/li>\n<li>Install Cloud Foundry\u2019s CLI tool.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Getting_a_suitable_IPport_combination\"><\/span>Getting a suitable IP\/port combination<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>In order to execute some remote debuggers, you need to send data from your application server to your computer. This can be a little tricky. Why? It is most likely that you are behind a router and\/or firewall.<\/p>\n<p>So firstly, you need to get your public IP address by going to Google and typing in the search box <b>\u201cpublic ip address.\u201d<\/b> This will return your public IP address that the application server\u2019s JVM will be connecting to for remote debugging.<\/p>\n<p>Next, you will have to open and forward an external (public) port to your computer LAN IP address and port. It is done by tapping into the configuration of your router or asking the support guys to do it for you.<\/p>\n<p>Let\u2019s say, your LAN IP address is <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">192.168.1.11<\/code>, and the port that will be listening to connections in your computer is 9571. Assume that your public IP address is <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">186.201.35.89<\/code>, and the public port is 29571. First thing to do is port forwarding that will move the packages that the remote application server sends to <code style=\"color: black; background-color: #e6e6e6;\">186.201.35.89&colon;29571<\/code> right to your computer (<code style=\"color: black; background-color: #e6e6e6;\">192.168.1.11&colon;9571<\/code>). So, the IP\/port combination we are going to use for the configuration of the remote application server debugger is <code style=\"color: black; background-color: #e6e6e6;\">186.201.35.89&colon;29571<\/code>.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Remotely_debugging_Java_applications\"><\/span>Remotely debugging Java applications<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>In order to remotely debug Java applications, we need to tell the JVM to establish the connection to the remote debugger and then set up your IDE\u2019s debugger to listen to the connections from the application.<\/p>\n<p><strong>Setting up our IDE<\/strong><\/p>\n<p>Since one of the most used IDEs out there for Java development is Eclipse, we will use it as a reference. The instructions are very translatable to others, such as NetBeans or JetBrain\u2019s IDEA.<\/p>\n<ol>\n<li>Open your project in Eclipse.<\/li>\n<li>Right-click on your project, go to <em>Debug<\/em> as and pick <em>Debug Configurations<\/em>.<\/li>\n<li style=\"margin-bottom: 6px;\">Create a new Remote Java Application:\n<ul>\n<li>Make sure your project is selected.<\/li>\n<li>Choose <em>Standard (Socket Listen)<\/em> from the <em>Connection Type<\/em> drop-down menu.<\/li>\n<li>Now, set a port for the remote debugger to connect to. In our example, it is 9571.<\/li>\n<\/ul>\n<\/li>\n<li>Click <em>Debug<\/em>.<\/li>\n<\/ol>\n<p><strong>Getting our application server-ready<\/strong><\/p>\n<p>In Cloud Foundry, we do this by modifying the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">manifest.yml<\/code> file of the application, adding the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">env<\/code> section that will hold the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">JAVA_OPTS<\/code> variable with the appropriate instructions.<\/p>\n<p>Let\u2019s say, this is our (very simple) <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">manifest.yml<\/code>:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n---\r\napplications:\r\n- name: my-java-application\r\n  memory: 768M\r\n  instances: 1\r\n  path: my-java-application-1.0.0.BUILD-SNAPSHOT.jar\r\n  buildpack: https:\/\/github.com\/cloudfoundry\/java-buildpack.git\r\n<\/pre>\n<p>We add the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">env<\/code> section and the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">JAVA_OPTS<\/code> lines.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n---\r\napplications:\r\n- name: my-java-application\r\n  memory: 768M\r\n  instances: 1\r\n  path: my-java-application-1.0.0.BUILD-SNAPSHOT.jar\r\n  buildpack: https:\/\/github.com\/cloudfoundry\/java-buildpack.git\r\nenv:\r\n  JAVA_OPTS: -agentlib:jdwp=transport=dt_socket,address=&lt;your-ip&gt;:&lt;your-port&gt;\r\n<\/pre>\n<p>Surely, you need to change the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">&lt;your-ip&gt;:&lt;your-port&gt;<\/code> to the actual values. So, that <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">JAVA_OPTS<\/code> line will be as follows below.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">JAVA_OPTS: -agentlib:jdwp=transport=dt_socket,address=186.201.35.89:29571<\/pre>\n<p>To complete this part, just push the changes with <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">cf push<\/code>. You need the Cloud Foundry CLI to do this.<\/p>\n<p>Now, you will be able to set breakpoints in your code and watch it execute, as well as inspect variables and all the debug features as if they were running in your local box.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Remotely_debugging_Ruby_applications\"><\/span>Remotely debugging Ruby applications<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Remote debugging Ruby applications involves adding a custom start command to the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">manifest.yml<\/code> (or running that custom start from the Cloud Foundry CLI), adding a couple of gems to your application, and setting up your IDE.<\/p>\n<p><strong>How to set up an IDE<\/strong><\/p>\n<p>Since the Eclipse configuration is exactly the same both for Java and Ruby applications (in case you work with Aptana), we are going to set up JetBrain\u2019s RubyMine IDE, one of the most popular Ruby IDEs.<\/p>\n<ol>\n<li style=\"margin-bottom: 6px;\">Open your project in RubyMine.<\/li>\n<li style=\"margin-bottom: 6px;\">Go to the <em>Run Configurations<\/em> drop-down menu in the toolbar and click on <em>Edit Configurations<\/em>.<\/li>\n<li style=\"margin-bottom: 6px;\">In the <em>Run\/Debug<\/em> configurations dialog, click on <em>Add New Configuration<\/em> and select Ruby remote debug:\n<ul>\n<li style=\"margin-bottom: 6px;\">Set the name accordingly.<\/li>\n<li style=\"margin-bottom: 6px;\">In <em>Remote Host<\/em>, put the URL or IP address where the remote debugging is going to happen.<\/li>\n<li style=\"margin-bottom: 6px;\">In <em>Remote Port<\/em>, type the port of the remote machine where the remote debugger will listen. Make sure this port is open in the server. In our example, let\u2019s set it to 8080.<\/li>\n<li style=\"margin-bottom: 6px;\">In <em>Remote Root Folder<\/em>, specify the root folder of your application.<\/li>\n<li style=\"margin-bottom: 6px;\">In <em>Local Port<\/em>, specify the local port that the remote debugger will connect to. In our case, it is 29571.<\/li>\n<li style=\"margin-bottom: 6px;\">In <em>Local Root Folder<\/em>, click \u201cbrowse\u201d and find the root folder of your application in the dialog box.<\/li>\n<li style=\"margin-bottom: 6px;\">Copy the line in the \u201cServer command\u201d read-only field in your clipboard.<\/li>\n<\/ul>\n<\/li>\n<li>Apply the changes and click on the Debug icon in the toolbar.<\/li>\n<\/ol>\n<p><strong>Modify your Gemfile<\/strong><\/p>\n<p>Simply add this line to your Gemfile to allow your application to debug remotely to an IDE.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">gem \u2018ruby-debug-ide\u2019<\/pre>\n<p><strong>Modify your <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">manifest.yml<\/code> or start the remote debugger<\/strong><\/p>\n<p>You have two options here. The first one is to modify <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">manifest.yml<\/code> and add the command attribute under the applications section.<\/p>\n<p>Just use the line you copied to your clipboard as shown below.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">rdebug-ide -d \u2013host 0.0.0.0 \u2013port 8080 \u2013dispatcher-port 29571 \u2013 bin\/rails s<\/pre>\n<p>So, your (very simple) <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">manifest.yml<\/code> will look like shown below.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n---\r\napplications:\r\n- name: my-rails-app\r\n  instances: 1\r\n  command: \u201crdebug-ide -d \u2013host 0.0.0.0 \u2013port 8080 \u2013dispatcher-port 29571 \u2013 bin\/rails s\u201d\r\n<\/pre>\n<p>Do <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">cf push<\/code> and you are ready to start remote debugging.<\/p>\n<p>The other option is to simply run the custom start command from the CLI.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">cf push my-rais-app -c \u201crdebug-ide -d \u2013host 0.0.0.0 \u2013port 8080 \u2013dispatcher-port 29571 \u2013 bin\/rails s\u201d<\/pre>\n<p>That is all for debugging Ruby applications. In this case, a Rails one. However, if you have a pure and simple Ruby app, replace the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">bin\/rails s<\/code> part of the command with the file name of your Ruby script.<\/p>\n<p><strong>Using Pry with Cloud Foundry<\/strong><\/p>\n<p>An alternative to the classical IDE debugger is to use the much beloved Pry gem.<\/p>\n<p>First, you need to include the following line in your application&#8217;s Gemfile.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">gem 'pry-remote'<\/pre>\n<p>Then, in your code, you need to tell Pry to start debugging and connect to the host and port that will listen remotely.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">def my_function\r\n  binding.remote_pry(186.201.35.89, 29571)\r\nend<\/pre>\n<p>After that, do <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">cf push<\/code> to deploy and restart the application. When the application hits the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">binding.remote_pry<\/code> line, it will start the DRb server in port 9876 (by default, make sure it is open) and wait for client connections.<\/p>\n<p>Next, go to your application root directory and do the following.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">pry-remote -s &lt;host&gt; -c<\/pre>\n<p>where <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">&lt;host&gt;<\/code> is the URL or IP address of the remote application server. And there you are\u2014remote debugging your Ruby application with Pry!<\/p>\n<p>Remote debugging can be very useful in some circumstances and, as shown here, it is quite simple to remotely debug applications deployed with Cloud Foundry. Only a couple of changes in some files, <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">cf push<\/code>, and you are done.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Further_reading\"><\/span>Further reading<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li><a href=\"https:\/\/www.altoros.com\/blog\/troubleshooting-net-apps-on-cloud-foundry-logs-metrics-and-remote-debugging\/\">Troubleshooting .NET Apps on Cloud Foundry: Logs, Metrics, and Remote Debugging<\/a><\/li>\n<li><a href=\"https:\/\/www.altoros.com\/blog\/advanced-real-time-debugging-with-bluemix-live-sync\/\">Real-Time Debugging in Production with Bluemix Live Sync<\/a><\/li>\n<\/ul>\n<hr \/>\n<p><center><small>This post was written by <a href=\"https:\/\/www.altoros.com\/blog\/author\/juan-pablo-genovese\/\">Juan Pablo Genovese<\/a>, edited by <a href=\"https:\/\/www.altoros.com\/blog\/author\/sophie-turol\/\">Sophia Turol<\/a> and <a href=\"https:\/\/www.altoros.com\/blog\/author\/alex\/\">Alex Khizhniak<\/a>.<\/b><\/small><\/center><\/p>\n","protected":false},"excerpt":{"rendered":"<\/p>\n<p>When using Cloud Foundry for deploying apps, one might expect that all the test suites will run painlessly, and what works in development\/testing\/staging will work in production. However, what if it won\u2019t? What if it is impossible to replicate those conditions in a non-production environment? Here, remote debugging comes to [&#8230;]<\/p>\n","protected":false},"author":72,"featured_media":45937,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","footnotes":"","_links_to":"","_links_to_target":""},"categories":[214],"tags":[873,206],"class_list":["post-45907","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-cloud-native","tag-oss-cloud-foundry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Remotely Debug Cloud Foundry Apps | Altoros<\/title>\n<meta name=\"description\" content=\"Learn how to get a suitable IP\/port combination, set up an IDE, get an app server-ready, modify Gemfile, start the remote debugger, etc.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.altoros.com\/blog\/how-to-remotely-debug-cloud-foundry-apps\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Remotely Debug Cloud Foundry Apps | Altoros\" \/>\n<meta property=\"og:description\" content=\"When using Cloud Foundry for deploying apps, one might expect that all the test suites will run painlessly, and what works in development\/testing\/staging will work in production. However, what if it won\u2019t? What if it is impossible to replicate those conditions in a non-production environment? Here, remote debugging comes to [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.altoros.com\/blog\/how-to-remotely-debug-cloud-foundry-apps\/\" \/>\n<meta property=\"og:site_name\" content=\"Altoros\" \/>\n<meta property=\"article:published_time\" content=\"2015-06-02T16:40:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-08-09T14:37:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2015\/06\/debugging-cloud-foundry-apps-remotely.png\" \/>\n\t<meta property=\"og:image:width\" content=\"640\" \/>\n\t<meta property=\"og:image:height\" content=\"360\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Juan Pablo Genovese\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Juan Pablo Genovese\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.altoros.com\/blog\/how-to-remotely-debug-cloud-foundry-apps\/\",\"url\":\"https:\/\/www.altoros.com\/blog\/how-to-remotely-debug-cloud-foundry-apps\/\",\"name\":\"How to Remotely Debug Cloud Foundry Apps | Altoros\",\"isPartOf\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/how-to-remotely-debug-cloud-foundry-apps\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/how-to-remotely-debug-cloud-foundry-apps\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2015\/06\/debugging-cloud-foundry-apps-remotely.png\",\"datePublished\":\"2015-06-02T16:40:53+00:00\",\"dateModified\":\"2019-08-09T14:37:38+00:00\",\"author\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/bab57a26eebaa36ceb969b5230441203\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/how-to-remotely-debug-cloud-foundry-apps\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.altoros.com\/blog\/how-to-remotely-debug-cloud-foundry-apps\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.altoros.com\/blog\/how-to-remotely-debug-cloud-foundry-apps\/#primaryimage\",\"url\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2015\/06\/debugging-cloud-foundry-apps-remotely.png\",\"contentUrl\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2015\/06\/debugging-cloud-foundry-apps-remotely.png\",\"width\":640,\"height\":360},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.altoros.com\/blog\/how-to-remotely-debug-cloud-foundry-apps\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.altoros.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Remotely Debug Cloud Foundry Apps\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.altoros.com\/blog\/#website\",\"url\":\"https:\/\/www.altoros.com\/blog\/\",\"name\":\"Altoros\",\"description\":\"Insight\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.altoros.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/bab57a26eebaa36ceb969b5230441203\",\"name\":\"Juan Pablo Genovese\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/12\/AAEAAQAAAAAAAAj2AAAAJGQ2MGU4ZDllLTllMDktNGY5Yi05NjBhLTY3ODc1YWViZTVkYw-150x150.jpg\",\"contentUrl\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/12\/AAEAAQAAAAAAAAj2AAAAJGQ2MGU4ZDllLTllMDktNGY5Yi05NjBhLTY3ODc1YWViZTVkYw-150x150.jpg\",\"caption\":\"Juan Pablo Genovese\"},\"description\":\"Juan Pablo Genovese is a Field Cloud Foundry Engineer at Altoros. He has been developing software for 18 years, and as a Jack Of All Trades, has also been into DevOps work. Juan Pablo is focused on training new DevOps at Altoros and identifying the needs of the community. His professional interests include high performance\/high availability solutions with cloud technologies, as well as designing architectures that meet customer expectations.\",\"url\":\"https:\/\/www.altoros.com\/blog\/author\/juan-pablo-genovese\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Remotely Debug Cloud Foundry Apps | Altoros","description":"Learn how to get a suitable IP\/port combination, set up an IDE, get an app server-ready, modify Gemfile, start the remote debugger, etc.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.altoros.com\/blog\/how-to-remotely-debug-cloud-foundry-apps\/","og_locale":"en_US","og_type":"article","og_title":"How to Remotely Debug Cloud Foundry Apps | Altoros","og_description":"When using Cloud Foundry for deploying apps, one might expect that all the test suites will run painlessly, and what works in development\/testing\/staging will work in production. However, what if it won\u2019t? What if it is impossible to replicate those conditions in a non-production environment? Here, remote debugging comes to [...]","og_url":"https:\/\/www.altoros.com\/blog\/how-to-remotely-debug-cloud-foundry-apps\/","og_site_name":"Altoros","article_published_time":"2015-06-02T16:40:53+00:00","article_modified_time":"2019-08-09T14:37:38+00:00","og_image":[{"width":640,"height":360,"url":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2015\/06\/debugging-cloud-foundry-apps-remotely.png","type":"image\/png"}],"author":"Juan Pablo Genovese","twitter_misc":{"Written by":"Juan Pablo Genovese","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.altoros.com\/blog\/how-to-remotely-debug-cloud-foundry-apps\/","url":"https:\/\/www.altoros.com\/blog\/how-to-remotely-debug-cloud-foundry-apps\/","name":"How to Remotely Debug Cloud Foundry Apps | Altoros","isPartOf":{"@id":"https:\/\/www.altoros.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.altoros.com\/blog\/how-to-remotely-debug-cloud-foundry-apps\/#primaryimage"},"image":{"@id":"https:\/\/www.altoros.com\/blog\/how-to-remotely-debug-cloud-foundry-apps\/#primaryimage"},"thumbnailUrl":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2015\/06\/debugging-cloud-foundry-apps-remotely.png","datePublished":"2015-06-02T16:40:53+00:00","dateModified":"2019-08-09T14:37:38+00:00","author":{"@id":"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/bab57a26eebaa36ceb969b5230441203"},"breadcrumb":{"@id":"https:\/\/www.altoros.com\/blog\/how-to-remotely-debug-cloud-foundry-apps\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.altoros.com\/blog\/how-to-remotely-debug-cloud-foundry-apps\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.altoros.com\/blog\/how-to-remotely-debug-cloud-foundry-apps\/#primaryimage","url":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2015\/06\/debugging-cloud-foundry-apps-remotely.png","contentUrl":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2015\/06\/debugging-cloud-foundry-apps-remotely.png","width":640,"height":360},{"@type":"BreadcrumbList","@id":"https:\/\/www.altoros.com\/blog\/how-to-remotely-debug-cloud-foundry-apps\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.altoros.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Remotely Debug Cloud Foundry Apps"}]},{"@type":"WebSite","@id":"https:\/\/www.altoros.com\/blog\/#website","url":"https:\/\/www.altoros.com\/blog\/","name":"Altoros","description":"Insight","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.altoros.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/bab57a26eebaa36ceb969b5230441203","name":"Juan Pablo Genovese","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/12\/AAEAAQAAAAAAAAj2AAAAJGQ2MGU4ZDllLTllMDktNGY5Yi05NjBhLTY3ODc1YWViZTVkYw-150x150.jpg","contentUrl":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/12\/AAEAAQAAAAAAAAj2AAAAJGQ2MGU4ZDllLTllMDktNGY5Yi05NjBhLTY3ODc1YWViZTVkYw-150x150.jpg","caption":"Juan Pablo Genovese"},"description":"Juan Pablo Genovese is a Field Cloud Foundry Engineer at Altoros. He has been developing software for 18 years, and as a Jack Of All Trades, has also been into DevOps work. Juan Pablo is focused on training new DevOps at Altoros and identifying the needs of the community. His professional interests include high performance\/high availability solutions with cloud technologies, as well as designing architectures that meet customer expectations.","url":"https:\/\/www.altoros.com\/blog\/author\/juan-pablo-genovese\/"}]}},"_links":{"self":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts\/45907","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/users\/72"}],"replies":[{"embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/comments?post=45907"}],"version-history":[{"count":17,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts\/45907\/revisions"}],"predecessor-version":[{"id":45943,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts\/45907\/revisions\/45943"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/media\/45937"}],"wp:attachment":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/media?parent=45907"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/categories?post=45907"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/tags?post=45907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}