GithubHelp home page GithubHelp logo

shital-anand / javavscode Goto Github PK

View Code? Open in Web Editor NEW

This project forked from donjayamanne/javavscode

0.0 0.0 0.0 6.01 MB

Extension for java development on VSCode (deprecated)

Home Page: https://marketplace.visualstudio.com/items?itemName=donjayamanne.javaDebugger

License: MIT License

TypeScript 100.00%

javavscode's Introduction

Java Debugger (Deprecated)

This extension is no longer maintained. It has been deprecated in favor of Java Debug Extension for Visual Studio Code

Big thanks to Faustino Aguilar for his continued effort in maintaining this extension.

java-debugger

Java debugger extension for VSCode with support for debugging Local variables, arguments, stack trace, step through, partial support for JavaFX, expanding values (Objects, Arrays) etc.

Requirements

NOTE: Path to JDK is configured in launch.json

  • JDK is installed (version 1.7.0 and later)

Once installed, do remember to configure the JDK Path (in launch.json, else jdk path is assumed to be in the current path)

Ensure to compile the source code with debug symbols.

Debug info is needed to compile your code with debugging support, allowing to see variables value

variables

You can configure the tasks.json file as follows and use run the build task. see -g flag in command.

{
    "version": "2.0.0",
    "tasks": [
        {
            "taskName": "Compile Java",
            "type": "shell",
            "command": "javac -g ${file}",
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}

Then you need to add a launch configuration (launch.json):

{
    "name": "Java",
    "type": "java",
    "request": "launch",
    "stopOnEntry": true,
    "preLaunchTask": "build",                     // Runs the task created above before running this configuration
    "jdkPath": "${env:JAVA_HOME}/bin",            // You need to set JAVA_HOME enviroment variable
    "cwd": "${workspaceRoot}",
    "startupClass": "my.package.MyMainClass",     // The class you want to run
    "startupClassPathPattern": "src/main/java/",  // A pattern that matches the begining of your src path any paths after
                                                  // the pattern will be used to construct the classpath for your startupClass
    "sourcePath": ["${workspaceRoot}/src"],       // Indicates where your source (.java) files are
    "classpath": ["${workspaceRoot}/bin"],        // Indicates the location of your .class files
    "options": []                                 // Additional options to pass to the java executable
    "args": []                                    // Command line arguments to pass to the startup class
}

Image of Debugging

Features

Debug GUI applications.

Image of JavaFx

Inspect variables, set breakpoints and see output in console.

Image of Loop

Roadmap

  • Enhancements to java debugger (pause and continue, etc)
  • Debugging of Multi Threaded apps is possible but very flaky. The debugger could at times hang.
  • Exceptions support #46

Known issues

  • Sometimes debugger shows nothing, try to restart it. #27
  • Debugging Android. To debug Android use this extension instead.

Release Notes

See ChangeLog

Contributing

  1. Fork it https://github.com/DonJayamanne/javaVSCode/fork
  2. Create your feature branch git checkout -b my-new-feature
  3. Commit your changes git commit -am 'Add some feature'
  4. Push to the branch git push origin my-new-feature
  5. Create a new Pull Request

Big thanks to Faustino Aguilar

Source

Github

License

MIT

javavscode's People

Contributors

donjayamanne avatar faustinoaq avatar dueckminor avatar dave-gray101 avatar rianadon avatar tsedlar avatar llgcode avatar ppeeling avatar sel-en-ium avatar lacivert avatar mrawdon 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.