Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

Debugging components in OpenShift using VS Code

February 28, 2020
Mohit Suman
Related topics:
Developer ToolsIDEsJava
Related products:
Red Hat OpenShift

Share:

    The latest release of OpenShift Connector enhances the developer experience on Red Hat OpenShift with support for local code debugging. This enhancement lets the user write and debug local code without leaving the editor.

    Based on developer community feedback related to OpenShift Connector for Visual Studio Code (VS Code), one of the main focuses was to simplify the OpenShift workflow for developers by letting them debug code that is deployed on OpenShift directly from VS Code. Visual Studio Code's debugging architecture allows extension authors to easily integrate existing debuggers into VS Code while offering a common user interface for all of them.

    Following this principle, we added a new debug feature to our OpenShift extension for VS Code. This feature allows debugging local NodeJS and Java components deployed on an OpenShift instance directly from the IDE.

    This feature is available to the community from version 0.1.3 onwards and the extension can be installed from the VS Code Marketplace.

    How does it work?

    This release provides the new OpenShift: Debug command, which provides a simpler way to start debugging OpenShift components pushed to a cluster.

    OpenShift: Debug is an experimental feature that uses the experimental OpenShift Do (odo) debug command under the hood. This enhancement allows developers to set breakpoints directly in the source code, watch variables, and follow the full call stack when debugging—all without leaving the editor.

    Note: The debug feature is supported only for components created using local workspace and deployed on OpenShift. Components created using Git Repository and Binary File are not supported.

    The debug command can be invoked in following ways:

    1. Using the Command Palette [OpenShift: Debug] (Figure 1)
    openshift-connector-debug-command-palette

    Figure 1: Accessing the OpenShift: Debug command through the command palette.">

    2. Using OpenShift Application Explorer view. User needs to go to the context menu for component nodes and select Debug action as shown in Figure 2.

    openshift-connector-debug-context-menu

    Figure 2: Accessing the OpenShift: Debug command through the OpenShift Application Explorer view.">

    Debug a NodeJS component in OpenShift

    The default Visual Studio Code installation includes JavaScript/TypeScript language support and the debugger extensions required to debug a NodeJS component. That means that the new OpenShift: Debug command can be used without installing any additional extensions. To get started:

    1. Install OpenShift Connector from the marketplace or from the Extensions icon in VS Code.
    2. Log into the running OpenShift cluster.
    3. Create a NodeJS component from the local workspace and deploy it in OpenShift.
    4. Perform the debugging actions as shown in the video below, which shows a detailed walk-through of the workflow for debugging a local NodeJS component on OpenShift:

    https://developers.redhat.com/media/119201

    Debug a Java component in OpenShift

    To debug a Java component, the Java Language Support and Java Debugger extensions are required. Therefore, the OpenShift Connector extension will prompt you to install the missing extension(s) before launching the debugger for a Java component. To get started:

    1. Install OpenShift Connector from the marketplace or from the Extensions icon in VS Code.
    2. Log into the running OpenShift cluster.
    3. Create a Java component from the local workspace and deploy it in OpenShift.
    4. Perform the debugging actions as shown in the video below, which shows a detailed walk-through of the workflow for debugging a local Java component on OpenShift:

    https://developers.redhat.com/media/119191

    Feedback

    We’ve released this extension on GitHub as an MIT-licensed open source project, and the extension is available in the VS Code Marketplace. We really want your feedback and help to build an even better debugging experience. If you have any issues or ideas for improvements, feel free to reach out to us on Gitter or GitHub.

    Look out for more awesome features in the next releases!

    Last updated: February 5, 2024

    Recent Posts

    • Our top 10 articles of 2025 (so far)

    • The benefits of auto-merging GitHub and GitLab repositories

    • Supercharging AI isolation: microVMs with RamaLama & libkrun

    • Simplify multi-VPC connectivity with amazon.aws 9.0.0

    • How HaProxy router settings affect middleware applications

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2025 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue