<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Dori_an</title>
    <description>The latest articles on DEV Community by Dori_an (@dori_an).</description>
    <link>https://dev.to/dori_an</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F508023%2F63de64f3-b938-4c7f-a917-287ce462b57c.png</url>
      <title>DEV Community: Dori_an</title>
      <link>https://dev.to/dori_an</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dori_an"/>
    <language>en</language>
    <item>
      <title>Steps for Conducting a Kubernetes Security AssessmentSteps for Conducting a Kubernetes Security Assessment</title>
      <dc:creator>Dori_an</dc:creator>
      <pubDate>Wed, 23 Feb 2022 07:57:53 +0000</pubDate>
      <link>https://dev.to/dori_an/steps-for-conducting-a-kubernetes-security-assessmentsteps-for-conducting-a-kubernetes-security-assessment-1g5g</link>
      <guid>https://dev.to/dori_an/steps-for-conducting-a-kubernetes-security-assessmentsteps-for-conducting-a-kubernetes-security-assessment-1g5g</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LTBqoU0a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh4.googleusercontent.com/KfX6KbdPgmqNFbCeveTQa8cbaGyTpen7rVyzHGaQrGC26EVPBu5LkCLcwlQe-k1SBgF_Y_6DTF3RbK6cDhUCAfhZcol_f6y1DlJiDsRH0tI_g5Ag30IT7xsiF_hyUnWFOA" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LTBqoU0a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh4.googleusercontent.com/KfX6KbdPgmqNFbCeveTQa8cbaGyTpen7rVyzHGaQrGC26EVPBu5LkCLcwlQe-k1SBgF_Y_6DTF3RbK6cDhUCAfhZcol_f6y1DlJiDsRH0tI_g5Ag30IT7xsiF_hyUnWFOA" alt="" width="880" height="587"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://unsplash.com/photos/eUMEWE-7Ewg"&gt;Photo&lt;/a&gt; by &lt;a href="https://unsplash.com/@jbcreate_"&gt;Joseph Barrientos&lt;/a&gt; on Unsplash&lt;/p&gt;

&lt;p&gt;Kubernetes has been widely adopted due to its flexibility and lack of fragmentation. The fact that Kubernetes orchestrates more than three-quarters of containerized applications proves that people indeed love Kubernetes. As a result, Kubernetes is becoming one of the most crucial parts of the ecosystem of most IT organizations.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EhSmPVuy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh4.googleusercontent.com/9XVv2IOx4e6oHfw4WMzG_QW7-ioFk6V9AqUIAW7iM6gGKEwqeQVfbOnvLPHa1JRL9Pq9SunPMoKHW_S-N5F7zbMtatBzd-5S2Cv1PGk--K6ORXZZ6P6x9VWqjd0goBwnKA" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EhSmPVuy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh4.googleusercontent.com/9XVv2IOx4e6oHfw4WMzG_QW7-ioFk6V9AqUIAW7iM6gGKEwqeQVfbOnvLPHa1JRL9Pq9SunPMoKHW_S-N5F7zbMtatBzd-5S2Cv1PGk--K6ORXZZ6P6x9VWqjd0goBwnKA" alt="" width="880" height="359"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;While Kubernetes is widely applicable, it also introduces new attack surfaces as it is often misconfigured. According to a research report by &lt;a href="https://www.trendmicro.com/en_us/research/21/e/teamtnt-targets-kubernetes--nearly-50-000-ips-compromised.html"&gt;Trend Micro&lt;/a&gt;, TeamTNT conducted a targeted attack on Kubernetes and managed to compromise nearly 50,000 IP addresses. In this paper, we will go through several steps and methods to conduct a Kubernetes security assessment.&lt;/p&gt;

&lt;h2&gt;
  
  
  1.  Securing Kubernetes Hosts
&lt;/h2&gt;

&lt;p&gt;Kubernetes provides various options for deploying Kubernetes on your infrastructure: on-premise, on bare metal, on the public cloud. Kubernetes was designed to be highly portable and to facilitate multiple configurations and changes. While this flexibility is helpful in certain scenarios, it also introduces various possible attack vectors. To make sure that all the hosts you run on Kubernetes are secure, ensure the operating systems (OS) are secured by installing their latest versions, implementing OS hardening, and implementing patch management and essential firewall rules.&lt;/p&gt;

&lt;h2&gt;
  
  
  2.  Kubernetes Version Control
&lt;/h2&gt;

&lt;p&gt;The open source community is constantly coming up with new features and bug fixes for Kubernetes in newer versions. So, it becomes arduous to keep track of all versions and potential attack vectors. The best way to prevent most attacks is to always keep the Kubernetes version updated to the latest version available.&lt;/p&gt;

&lt;h2&gt;
  
  
  3.  Kubernetes Components
&lt;/h2&gt;

&lt;p&gt;As Kubernetes is a labyrinth of various features and numerous configurations, it is critical to make sure all components of Kubernetes are secure.&lt;/p&gt;

&lt;h2&gt;
  
  
  4.  Sensitive Ports
&lt;/h2&gt;

&lt;p&gt;Kubernetes typically listens on a variety of ports. If you leave Kubernetes with its default configurations, it is easy for attackers to identify which port is running what service and attack them. Thus, it is critical to configure authentication and authorization on the main cluster and the cluster nodes.&lt;/p&gt;

&lt;p&gt;To ensure that ports on your nodes are configured correctly, it is critical to follow &lt;a href="https://www.armosec.io/blog/kubernetes-security-best-practices/"&gt;K8s best practices&lt;/a&gt;. Ideally, in Kubernetes security assessment, the auditor should test if sensitive ports are left with their default configurations and if authentication and authorization on the main cluster is well configured or not.&lt;/p&gt;

&lt;h2&gt;
  
  
  5.  Direct Access to Kubernetes API
&lt;/h2&gt;

&lt;p&gt;Kubernetes API is one of the most critical components of any Kubernetes infrastructure. The whole Kubernetes platform can be controlled using various API requests, so if the API is compromised, it could compromise the entire platform. Therefore, it is important to control access to the Kubernetes API. More instructions on controlling access can be found in the &lt;a href="https://kubernetes.io/docs/concepts/security/controlling-access/"&gt;documentation&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  6.  Test Direct SSH Access to Kubernetes Nodes
&lt;/h2&gt;

&lt;p&gt;If enabled, SSH (&lt;a href="https://en.wikipedia.org/wiki/Secure_Shell"&gt;secure shell&lt;/a&gt;) introduces additional attack surfaces for attackers to exploit. Therefore, in security assessment, it should be tested whether direct SSH access to Kubernetes nodes is possible or not.&lt;/p&gt;

&lt;p&gt;To reduce the risk of attackers performing brute force attacks or SSH exploits, SSH should be disabled, and users should use "kubectl exec" instead to get direct access to the Kubernetes container.&lt;/p&gt;

&lt;h2&gt;
  
  
  7.  Test if TLS (Transport Layer Security) Is Implemented
&lt;/h2&gt;

&lt;p&gt;In most cases, system administrators do not implement TLS even though communications in the cluster between services should be handled using TLS while encrypting all traffic by default. If TLS is not configured, attackers in the network can sniff for packets and capture sensitive communications between services. So, Kubernetes expects every API call and communication in the cluster to be encrypted with TLS.&lt;/p&gt;

&lt;p&gt;By default, most Kubernetes installation methods provide users with the option to install and create necessary certificates and distribute them to the cluster components to implement TLS. More details about how TLS can be used in a Kubernetes cluster can be found in the documentation.&lt;/p&gt;

&lt;h2&gt;
  
  
  8.  Kubernetes Dashboard
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--41MLcSx2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh3.googleusercontent.com/Ang5bSxOE6nFRNOhA6toMpLj5lTfd50mdb1ZauRTk33lGMsfXutKzyLE1FN5aC3uQloARWwU4ZgO7YQSVm9p1i5RMjwytN6InuVSBpiKDuPuVmczbhgzOk9v1g-uhqlwXA" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--41MLcSx2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh3.googleusercontent.com/Ang5bSxOE6nFRNOhA6toMpLj5lTfd50mdb1ZauRTk33lGMsfXutKzyLE1FN5aC3uQloARWwU4ZgO7YQSVm9p1i5RMjwytN6InuVSBpiKDuPuVmczbhgzOk9v1g-uhqlwXA" alt="" width="880" height="585"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/"&gt;Source&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In addition to the command line and API, Kubernetes allows users to manage clusters with a Kubernetes web app called Kubernetes Dashboard. While it is not installed by default, it can be installed by system administrators of the cluster.&lt;/p&gt;

&lt;p&gt;Generally, most installations consist of creating a service account with high privileges. Unfortunately, this can result in a poorly configured Kubernetes Dashboard with the possibility of getting hacked. Even big companies like Tesla are not exempt from making this mistake. In 2018, Tesla's Kubernetes resources got &lt;a href="https://arstechnica.com/information-technology/2018/02/tesla-cloud-resources-are-hacked-to-run-cryptocurrency-mining-malware/"&gt;hacked&lt;/a&gt; to run crypto-mining malware.&lt;/p&gt;

&lt;p&gt;To configure Kubernetes Dashboard properly, make sure that dashboards are not exposed to the public without proper authentication. It should not be possible to access the dashboard from outside the LAN. You can also limit the number of service accounts with RBAC. Additionally, make sure the service account of the dashboard is not given high privileges. Finally, deploy authenticating reverse proxy on the dashboard and enable multi-factor authentication.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;As your Kubernetes infrastructure deals with vast amounts of computing resources, it is critical to protect those resources from attackers. The best way to prevent attackers from gaining unauthorized access to your Kubernetes infrastructure is to conduct regular manual security pentests and automated assessments with tools such as &lt;a href="https://github.com/armosec/kubescape"&gt;kubescape&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>kubernetes</category>
      <category>security</category>
    </item>
    <item>
      <title>How to Improve Your Solidity Smart Contract Programming Skills</title>
      <dc:creator>Dori_an</dc:creator>
      <pubDate>Tue, 12 Oct 2021 21:05:48 +0000</pubDate>
      <link>https://dev.to/dori_an/how-to-improve-your-solidity-smart-contract-programming-skills-3bkn</link>
      <guid>https://dev.to/dori_an/how-to-improve-your-solidity-smart-contract-programming-skills-3bkn</guid>
      <description>&lt;p&gt;Blockchain-based smart contracts allow developers to program complex business logic into software applications in a seamless manner. Smart contract programming is expected to be a highly sought-after skill as we head into 2022 and beyond. That's because writing Web 3.0 apps is well on its way to becoming a global standard and smart contracts are set to play a key role in the development of decentralized finance (DeFi) platforms.&lt;/p&gt;

&lt;p&gt;Ethereum (ETH) has emerged as the dominant blockchain for creating DeFi applications which serve a wide range of use-cases. For the first time in history, complex financial transactions can be executed without requiring costly intermediaries that may take a long time to settle transactions between different parties.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xCdrhHoc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh3.googleusercontent.com/9aA7mES9s7VTLzgbTAJn1SRMo-ZiUpEIZnMxVvk49_EdlrcMOWM-EIix5YVrhH6hR3lMbE0Tht68s_R_INYXG1auOjeeAO2bTfLEstjv3mCm2kOBmJPCwvkM2DzPZFOEqFcHoJH1%3Ds0" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xCdrhHoc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh3.googleusercontent.com/9aA7mES9s7VTLzgbTAJn1SRMo-ZiUpEIZnMxVvk49_EdlrcMOWM-EIix5YVrhH6hR3lMbE0Tht68s_R_INYXG1auOjeeAO2bTfLEstjv3mCm2kOBmJPCwvkM2DzPZFOEqFcHoJH1%3Ds0" alt="Solidity Logo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;While there are many so-called Ethereum competitors in the market, they don't benefit from nearly the same networking effects and large developer community. For this reason alone, Ethereum's native &lt;a href="https://docs.soliditylang.org/"&gt;Solidity&lt;/a&gt; smart contract programming language has become an industry standard. While other software development environments are also being widely-adopted, there's no denying that Solidity is among the most popular languages for programming smart contracts.&lt;/p&gt;

&lt;p&gt;So how does one go about learning Solidity? Well, you have to practice a lot and pay attention to details. In addition to that, here are four great ways to really sharpen your Solidity coding skills.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Reviewing Source Code Written by Other Programmers
&lt;/h2&gt;

&lt;p&gt;University professors in the computer science department will tell you always to read and seriously study source code written by skilled programmers. Oftentimes, the best way to learn how to program in a certain language requires carefully studying, line by line, how other developers have written their code.&lt;/p&gt;

&lt;p&gt;Writing code in Solidity is no exception, because one can only acquire the best smart contract programming skills by reading the code authored by other experienced software architects. When you read through large libraries of source-code, you will begin to learn how to properly program basic commands and tasks. For instance, there could be a standard or highly effective way to create a certain type of business application using smart contracts.&lt;/p&gt;

&lt;p&gt;By learning how this is done in a standardized, routine, and efficient manner, programmers will become experts. But of course, there's more to it than just reviewing code authored by others. So let's go over some other great ways to become a better Solidity coder.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Taking Solidity Programming Courses Online
&lt;/h2&gt;

&lt;p&gt;In the digital world, online computer programming courses are becoming highly popular amongst teenagers or older programmers who may be in University, working in an Internship, or even a seasoned developer trying to learn a new coding language.&lt;/p&gt;

&lt;p&gt;In some ways, learning Solidity is like learning a new natural language. You know, the kind humans speak such as English or Mandarin. You have to learn the syntax and all the semantics (meaning behind the code). Youtube is a free and highly-recommended platform for learning all things related to Solidity. One of the best things about YouTube is that it's free, so you don't pay anything to learn. Then there's also Udemy and other online learning portals like &lt;a href="https://www.khanacademy.org/"&gt;Khan Academy &lt;/a&gt;where people can go to learn new skills, including Solidity code, of course.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Hackathons
&lt;/h2&gt;

&lt;p&gt;But what could be better than learning for free? There's only one thing better, which is to potentially earn large rewards for getting better at Solidity coding. A great example for such a hackathon is the Metis hackathon. The developers of the Metis Layer-2, Optimum Rollup solutions for Ethereum have announced an exciting hackathon event that will allow participants to earn a share of $1 million in digital tokens.&lt;/p&gt;

&lt;p&gt;Metis is a great initiative because they provide opportunities to build cutting-edge dApps as well as a chance to participate in charitable projects.&lt;/p&gt;

&lt;p&gt;By competing in this hackathon event, you should be able to really sharpen those Solidity coding skills. For more information on this event, check &lt;a href="http://hackathon.metis.io/"&gt;here&lt;/a&gt;. &lt;/p&gt;

&lt;h2&gt;
  
  
  4. Software Testing, Debugging
&lt;/h2&gt;

&lt;p&gt;Another great way to get better at Solidity coding is to test programs and identify bugs or other issues. This will really teach you how to write programs in the right manner. You can also practice debugging code, by using special tools to run programs line by line, while studying and monitoring the changing values of program variables, and also check for other details.&lt;/p&gt;

&lt;p&gt;This is a good way to learn how programs actually work, so that you get a better idea of how to code smart contracts effectively.&lt;/p&gt;

&lt;p&gt;Cover Photo by &lt;a href="https://unsplash.com/@glenncarstenspeters?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Glenn Carstens-Peters&lt;/a&gt; on &lt;a href="https://unsplash.com/s/photos/smart-contract?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>ethereum</category>
      <category>contracts</category>
      <category>defi</category>
    </item>
    <item>
      <title>Introduction to Remote Java Debugging for Beginners</title>
      <dc:creator>Dori_an</dc:creator>
      <pubDate>Tue, 21 Sep 2021 01:44:27 +0000</pubDate>
      <link>https://dev.to/dori_an/introduction-to-remote-java-debugging-for-beginners-3480</link>
      <guid>https://dev.to/dori_an/introduction-to-remote-java-debugging-for-beginners-3480</guid>
      <description>&lt;h2&gt;
  
  
  Introduction 
&lt;/h2&gt;

&lt;p&gt;Most of us developers use our trusty print statements to debug the application, but analyzing the program over and over, adding/removing a bunch of print statements can be time consuming as well as exhausting. So, a debugger lies on the top of any developer's toolbox&lt;/p&gt;

&lt;p&gt;Debugging has come a long way with time. From Admiral Grace Hopper finding a moth in her system impacting her program in the 1940s and coining the term "Debugging", computer programs nowadays are more complicated. And with complexity, it becomes even much harder to find bugs in a huge codebase. &lt;/p&gt;

&lt;p&gt;This makes the need more pressing for a robust debugger which not only helps developers find bugs, but also perform debugging without affecting deployed running programs on remote systems.&lt;/p&gt;

&lt;p&gt;With debugging, it becomes easier to understand someone else's code.&lt;/p&gt;

&lt;p&gt;In 2020, total spending on cloud services by end-users was &lt;a href="https://www.datamation.com/cloud/end-user-public-cloud-spending/"&gt;$270 billion&lt;/a&gt;. With so many people adopting the cloud for its convenience, it is not surprising to know that developers are now developing their applications remotely on cloud servers. &lt;/p&gt;

&lt;p&gt;Though there are many benefits to developing Java applications remotely on cloud servers, the question of efficiently and correctly debugging arises. This is where remote debugging comes.&lt;/p&gt;

&lt;p&gt;In this article, we will take a look at &lt;a href="https://lightrun.com/debugging/remote-debugging/"&gt;remote debugging&lt;/a&gt; Java projects using Lightrun's remote debugging tool, Lightrun Cloud.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up IntelliJ IDEA
&lt;/h2&gt;

&lt;p&gt;According to the annual JVM ecosystem &lt;a href="https://snyk.io/blog/intellij-idea-dominates-the-ide-market-with-62-adoption-among-jvm-developers/"&gt;report&lt;/a&gt; by Snyk, 62% of developers use IntelliJ IDE as their main IDE (integrated development environment). IntelliJ provides higher developer productivity as well as increased testing and debugging productivity with improved testing plans.&lt;/p&gt;

&lt;p&gt;Therefore, we will be using a free-to-use production debugger called &lt;a href="https://lightrun.com/cloud/"&gt;Lightrun Cloud&lt;/a&gt;. It has logging capabilities and staging environments and operates on the IntelliJ IDE for Java applications. It is great for Monolith, microservices, Kubernetes, Docker Swarm, ECS, Big Data workers, serverless, and more such applications.&lt;/p&gt;

&lt;p&gt;There are multiple ways to set up Lightrun in your environment. The best way is to install it directly from the IntelliJ marketplace.&lt;/p&gt;

&lt;p&gt;Go to File &amp;gt; Settings.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yIIRUp3E--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh6.googleusercontent.com/rLSWvB4a8B69_L8z6eCWlOAhnKAHEOlKYut79QVDBu9COg30eyLvW-ZNWAYReBhW1_U8T43JQ1uUIr0w1UVfsJ7DqmGuMkcoOhH8_2_JLQax0Mt34z7X-qj5z3np-syjCkqVKYMu%3Ds0" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yIIRUp3E--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh6.googleusercontent.com/rLSWvB4a8B69_L8z6eCWlOAhnKAHEOlKYut79QVDBu9COg30eyLvW-ZNWAYReBhW1_U8T43JQ1uUIr0w1UVfsJ7DqmGuMkcoOhH8_2_JLQax0Mt34z7X-qj5z3np-syjCkqVKYMu%3Ds0" alt="screenshot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In settings, go to Plugins &amp;gt; Marketplace.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--smf4_qE---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh3.googleusercontent.com/HiKS8N85YIuYxKkRAsR9wc1MT644flzmV_V1wHtHgpbeLQBScMnKjqxtA4sRD4GxOFKTCF5mfTn4O_nQ88hYB1lmTPbM5t6_6BcXx7PF5anrULKLQ9cAt0N3S1s-mLu416WKV684%3Ds0" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--smf4_qE---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh3.googleusercontent.com/HiKS8N85YIuYxKkRAsR9wc1MT644flzmV_V1wHtHgpbeLQBScMnKjqxtA4sRD4GxOFKTCF5mfTn4O_nQ88hYB1lmTPbM5t6_6BcXx7PF5anrULKLQ9cAt0N3S1s-mLu416WKV684%3Ds0" alt="screenshot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here, search for Lightrun to Install.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--y4kumpCy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh3.googleusercontent.com/hpWe0BKm6zyfCSLxzSEeVb1QKmmwoTU-zAGa9VsFtZfA2hvJgnPhFlC-RJGyfj7pDLQe396vl6QNqElkBu_REqxaZE4Pw3t-qorAdeSbafJg0Wdeh2Y-gymMMBgE_8pVs1FkZhCu%3Ds0" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--y4kumpCy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh3.googleusercontent.com/hpWe0BKm6zyfCSLxzSEeVb1QKmmwoTU-zAGa9VsFtZfA2hvJgnPhFlC-RJGyfj7pDLQe396vl6QNqElkBu_REqxaZE4Pw3t-qorAdeSbafJg0Wdeh2Y-gymMMBgE_8pVs1FkZhCu%3Ds0" alt="screenshot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After a restart, Lightrun will be set up in your environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating Demo Code
&lt;/h2&gt;

&lt;p&gt;To add demo code, create a new java class file under src.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BRrB_nC_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh4.googleusercontent.com/c8xBxm-4aLNypkr92cKH7IBYB7aNo9rafNzGJnP8jjGYcYDNEaffQWd924hQFHrGwHMx-AUoxXW63vYbewEz3AVEEiInxkhTO8ntWqU5x6WyGKgsaburgdicb7acHuDcSvNHuEos%3Ds0" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BRrB_nC_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh4.googleusercontent.com/c8xBxm-4aLNypkr92cKH7IBYB7aNo9rafNzGJnP8jjGYcYDNEaffQWd924hQFHrGwHMx-AUoxXW63vYbewEz3AVEEiInxkhTO8ntWqU5x6WyGKgsaburgdicb7acHuDcSvNHuEos%3Ds0" alt="screenshot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here, add the following demo code to debug.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public static void main(String[] args) {
    System.out.println("Starting");
    for (char c = 'A'; c &amp;lt; 'Z'; c++) {
        try {
            Thread.sleep(2500);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println(c);
    }
    System.out.println("Complete");
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This code simply prints alphabets, but it is enough to demonstrate debugging.&lt;/p&gt;

&lt;h2&gt;
  
  
  Configuring Lightrun
&lt;/h2&gt;

&lt;p&gt;Now, we will need to add a new run configuration to properly run our debugger on the code.&lt;/p&gt;

&lt;p&gt;Navigate to Run &amp;gt; Edit Configuration. That should open a new window.&lt;/p&gt;

&lt;p&gt;Click on the + icon to create a new configuration and choose remote JVM Debug.&lt;/p&gt;

&lt;p&gt;Now, fill in the details as follows:&lt;/p&gt;

&lt;p&gt;Assign a name to the configuration. In this case, we have called it "lightrun-test".&lt;/p&gt;

&lt;p&gt;The host and port sections are the most important part of the configuration as they tell your IDE where to connect for the remote debug.&lt;/p&gt;

&lt;p&gt;Add the IP address of your remote system in the host section as well as the port of the service listening for remote debugging. Here, for the testing, we are putting localhost to specify we are connecting to localhost. You can keep command line arguments to default or change as needed. Copy the command line to a file for later use.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---vxrwYSW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh6.googleusercontent.com/qul4ntcMl9r7sSd52B6LBrzczC1_iEeMZLcXUKx1cQTT28oIwOxP0Owj6l-TDkohBwk5ThGU78YIRiywjYky8HbUPVk4oXJM4mJLM8JB28dGpUB6yOA85PetZ2ug1sYs9SpOnVed%3Ds0" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---vxrwYSW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh6.googleusercontent.com/qul4ntcMl9r7sSd52B6LBrzczC1_iEeMZLcXUKx1cQTT28oIwOxP0Owj6l-TDkohBwk5ThGU78YIRiywjYky8HbUPVk4oXJM4mJLM8JB28dGpUB6yOA85PetZ2ug1sYs9SpOnVed%3Ds0" alt="screenshot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Packaging the code in a JAR file
&lt;/h2&gt;

&lt;p&gt;Now that Lightrun is configured, we need to create a JAR file to run remotely. Open File &amp;gt; Project Structure and click on Artifacts.&lt;/p&gt;

&lt;p&gt;Click on +, click on JAR, and click "from the module with dependencies".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lXLu7gIY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh4.googleusercontent.com/KNSCS24JamfqdaSF1F4vmF9RRsJjA9SltTqszYi2bwslfjB7ML-ODrxKvMEdd5-xCDL6V0DXUdifaA0nkFVpO1WG3E1-esJUfi2W2cNeFAr2-8LDXR3N5HsT41L-S4oXGeOOJ2Zi%3Ds0" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lXLu7gIY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh4.googleusercontent.com/KNSCS24JamfqdaSF1F4vmF9RRsJjA9SltTqszYi2bwslfjB7ML-ODrxKvMEdd5-xCDL6V0DXUdifaA0nkFVpO1WG3E1-esJUfi2W2cNeFAr2-8LDXR3N5HsT41L-S4oXGeOOJ2Zi%3Ds0" alt="screenshot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the right side of the screen, click on the icon and select the class name, apply changes, and close.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XJdY8l2b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh5.googleusercontent.com/SYksb4hG_cO3EFCXONFqt3snh3LZYN2LhIlIrrtOxKSEgbl0G2bkITfp4cSdVnGnNcAhwKuIUcJESxeLGjoxSMvCJU48hX-D_KtsQXP1bVi4r4LOfO2cig7ZHk_Vjm31M7P976-v%3Ds0" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XJdY8l2b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh5.googleusercontent.com/SYksb4hG_cO3EFCXONFqt3snh3LZYN2LhIlIrrtOxKSEgbl0G2bkITfp4cSdVnGnNcAhwKuIUcJESxeLGjoxSMvCJU48hX-D_KtsQXP1bVi4r4LOfO2cig7ZHk_Vjm31M7P976-v%3Ds0" alt="screenshot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, you can build by going to Build and clicking on Build Artifacts. Next, click on  "Create JAR" and click on Build. Now, you should have a JAR file in the out/artifacts folder.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vvhRPQD5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh4.googleusercontent.com/d6UD8L0MBkwZQ2FwPMwEWJKYatZHpk5ZFwg4cEmIRiV8xgkbaR2ptFrQQ7J3qt6sH_3sj6XSjLhasy0gpeQzjU9v-TVzwK4IJyotX-Z4nF3N6EqeDQvbWROm5UqdhIItyrQJ_9EI%3Ds0" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vvhRPQD5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh4.googleusercontent.com/d6UD8L0MBkwZQ2FwPMwEWJKYatZHpk5ZFwg4cEmIRiV8xgkbaR2ptFrQQ7J3qt6sH_3sj6XSjLhasy0gpeQzjU9v-TVzwK4IJyotX-Z4nF3N6EqeDQvbWROm5UqdhIItyrQJ_9EI%3Ds0" alt="screenshot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, you can directly run the JAR using a command line with the string we copied before:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BN3FNKUK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh4.googleusercontent.com/wa84WmeP5PeQyPSJ1Sb5x2Yi3DbsTUj9YtdRfzUHva3WyypqT13oW_ebR03-7zI10RyuWi6VGv7IMXn-Qw7OqYZkYll-ldGjxQxVrl9SndasaCHDb5nqkU1W2o9zLcwq8_eA3TjL%3Ds0" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BN3FNKUK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh4.googleusercontent.com/wa84WmeP5PeQyPSJ1Sb5x2Yi3DbsTUj9YtdRfzUHva3WyypqT13oW_ebR03-7zI10RyuWi6VGv7IMXn-Qw7OqYZkYll-ldGjxQxVrl9SndasaCHDb5nqkU1W2o9zLcwq8_eA3TjL%3Ds0" alt="screenshot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding Configuration for The Running Application
&lt;/h2&gt;

&lt;p&gt;The next step is adding a new configuration for the application.&lt;/p&gt;

&lt;p&gt;Go to Run &amp;gt; Edit Configuration and add a new configuration under Application.&lt;/p&gt;

&lt;p&gt;Click on Modify Options and ADD VM options.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ghYL5Kw_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh6.googleusercontent.com/_fs6791jbnNShwJefEAaUAPO0OzGztHNs-FNHclt8sDlCR0XkR6T2zoyhX82QhqVD_GJXSOMQlq0t7slzd22Xwthud3daXCjhgjYDCMbWVrFc51-vqGv7pswKSUuIPKjJKnRNMOu%3Ds0" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ghYL5Kw_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh6.googleusercontent.com/_fs6791jbnNShwJefEAaUAPO0OzGztHNs-FNHclt8sDlCR0XkR6T2zoyhX82QhqVD_GJXSOMQlq0t7slzd22Xwthud3daXCjhgjYDCMbWVrFc51-vqGv7pswKSUuIPKjJKnRNMOu%3Ds0" alt="screenshot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Later, in the field of VM options, paste the string containing arguments.&lt;/p&gt;

&lt;p&gt;Now, you can directly run the application as well as debug it remotely by adding breakpoints.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gpU-wvoH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh4.googleusercontent.com/qURM6P8KpOALY4fTJATmr1Cg4BJvPAH22wTcY4tI6owaHsrTVqr1RbI-7gLIdNeUlA-yYZ_fKPQFiPCLl6-zDSYMgmKSd4eol-8_MUS-PBLMa1jaE7gs3pr-WV7AvMcBxKYs8IBu%3Ds0" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gpU-wvoH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh4.googleusercontent.com/qURM6P8KpOALY4fTJATmr1Cg4BJvPAH22wTcY4tI6owaHsrTVqr1RbI-7gLIdNeUlA-yYZ_fKPQFiPCLl6-zDSYMgmKSd4eol-8_MUS-PBLMa1jaE7gs3pr-WV7AvMcBxKYs8IBu%3Ds0" alt="screenshot"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Cover Photo by &lt;a href="https://unsplash.com/@altumcode?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;AltumCode&lt;/a&gt; on &lt;a href="https://unsplash.com/s/photos/coding?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
