4

I really hate the IDE. They are too heavyweight and add a bunch of IDE specific files and folders and whatnot when creating a project. For the sake of making things easier, I use code editors. My favorite are Brackets and Microsoft's cross platform Visual Studio Code. My only issue is that no matter how hard I try, I cannot find a way to compile or debug Java in these editors. When I make a search for "debug java in (editor name here), I get a bunch of results for debugging JavaScript, not Java.

Does anyone on stack know how to do this?

4castle
  • 32,613
  • 11
  • 69
  • 106
RyanWilliam
  • 47
  • 2
  • 8
  • 2
    Hmm. Looks like your looking for an IDE feature(integrated compiler and debugger) These IDE's were designed for C# (VS Code) and JavaScript (Both). They are not that great for Java. Have you checked plugins for Brackets? – James Parsons Jun 11 '15 at 00:42
  • As for Visual Studio Code there are currently at least two extensions available: [_Java Debugger_](https://marketplace.visualstudio.com/items?itemName=donjayamanne.javadebugger) and [_Java Debug_](https://marketplace.visualstudio.com/items?itemName=DSnake.java-debug). I haven't tried them myself, just for your information. – informatik01 May 31 '16 at 22:46

2 Answers2

2

You can compile Java using the command line, by navigating to the correct directory and using the javac command. I'm afraid you're probably out of luck when it comes to debuggers. The best you can do, to my knowledge, is to use prints to track your code.

JShell
  • 624
  • 2
  • 7
  • 22
  • Oh well. Thanks for the help, then. I have always used the command line to compile, but i like error highlighting and code tips – RyanWilliam Jun 10 '15 at 22:40
0

Found the following extension which allows you to debug and run java from VSC:

https://marketplace.visualstudio.com/items?itemName=donjayamanne.javadebugger

Not having much luck with it. Getting a bunch of debug-symbol errors, due to my dependencies and classes being in separate files. I think if you kept your code in one main code file, it could work nicely.

Greymarch
  • 606
  • 2
  • 7
  • 11