Giter Club home page Giter Club logo

java-debug's Introduction

Java Debug Server for Visual Studio Code

Overview

The Java Debug Server is an implementation of Visual Studio Code (VSCode) Debug Protocol. It can be used in Visual Studio Code to debug Java programs.

Features

  • Launch/Attach
  • Breakpoints
  • Exceptions
  • Pause & Continue
  • Step In/Out/Over
  • Variables
  • Callstacks
  • Threads
  • Debug console

Background

The Java Debug Server is the bridge between VSCode and JVM. The implementation is based on JDI (Java Debug Interface). It works with Eclipse JDT Language Server as an add-on to provide debug functionalities.

Repository Structure

  • com.microsoft.java.debug.core - the core logic of the debug server
  • com.microsoft.java.debug.plugin - wraps the debug server into an Eclipse plugin to work with Eclipse JDT Language Server

Installation

Windows:

mvnw.cmd clean install

Linux and macOS:

./mvnw clean install

Usage with eclipse.jdt.ls

To use java-debug as a jdt.ls plugin, an LSP client has to launch jdt.ls with initializationOptions that contain the path to the built java-debug jar within a bundles array:

{
    "initializationOptions": {
        "bundles": [
            "path/to/microsoft/java-debug/com.microsoft.java.debug.plugin/target/com.microsoft.java.debug.plugin-<version>.jar"
        ]
    }
}

Editor extensions like vscode-java take care of this.

Once eclipse.jdt.ls launched, the client can send a Command to the server to start a debug session:

{
  "command": "vscode.java.startDebugSession"
}

The response to this request will contain a port number on which the debug adapter is listening, and to which a client implementing the debug-adapter protocol can connect to.

License

EPL 1.0, See LICENSE file.

java-debug's People

Contributors

adpi2 avatar akaroml avatar andxu avatar ansyral avatar bhoppeadoy avatar crissnb avatar cscherryy avatar dependabot[bot] avatar eskibear avatar gayanper avatar jdneo avatar karlvr avatar mfussenegger avatar mozhuanzuojing avatar p10q avatar rgrunber avatar sbj42 avatar snjeza avatar testforstephen avatar tom-shan avatar yaohaizh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.