Hacker News new | ask | show | jobs
Using VS Code to Debug Java Applications (code.visualstudio.com)
96 points by hexiaokai 3191 days ago
5 comments

VS Code is set to rule the developer world. The core and extension model is designed beautifully. While the core editor is concentrated at performance, the extensions provide feature rich functionality for each developer needs.
I am a long-time emacs user, yet I am amazed by the simplicity of VS-Code. The only downside is that it is heavy on the CPU and some basic functionality like showing line breaks is not included.

Otherwise it is a wonderful peace of software.

And the key bindings are lousy.

But, setting that aside, I was begrudgingly impressed. I was conditioned at an impressionable age to be revolted by anything Microsoft, and VS Code mostly won me over.

I still prefer emacs, but only because I haven't managed to customize VS Code to match my workflow (that might be impossible for now given that I spend about half my time working in Clojure).

> And the key bindings are lousy.

The key bindings are incredibly configurable and recent versions have added a really nice GUI for it (over just manually editing the JSON configs).

https://code.visualstudio.com/docs/getstarted/keybindings

The configuration of key bindings has been put through the ringer by the vscodevim extension, which has long been one of the "first customers" of the key binding configurations. If Vim can bind a key to it, for the most part so can you. There are very few functions in the application that you can't key bind if you wish.

Furthermore, extensions can contribute key maps and there are key map extensions based on a number of other editors already as extensions. A link right below the key binding configuration takes you to a recommended extension list.

It is interesting that VSCode defaults to a relatively small key map, encouraging you to explore commands through the command palette instead, but VSCode seems to make up for that by giving you a lot of power to customize as you see fit (and extension capabilities to share those customizations with others).

Does editing your config to add this help?

"files.eol": "\n", // blah blah some comment here

I think it also has a notification in the lower right, LF and CRLF.

Not the best, but maybe learnable with practice?

Disclaimer: I have only played with it. I do program a little but it is not something you want to pay me to do.

What I don't like about plugin system is security. You install extensions from the internet which have full access to your computer including the source code you're working with. Personally, I wouldn't trust any extension or plugin not provided by a major company.
> You install extensions from the internet which have full access to your computer

This is an issue in almost every other editor that has plugins! Vim, Emacs, Sublime Text, etc have widely used automatic plugin installation tools.

You can manually download and install plugins if you're worried about a 3rd party issuing malicious automatic updates.

That point is where VS Code is strong. These extensions are made by the VS Code team itself. Apart from that, AFAIK these plugins are not installed as binary but source code. They have transparency at least.
>Apart from that, AFAIK these plugins are not installed as binary but source code. They have transparency at least.

You can say the same about browser extensions. They have the same distribution mechanism as VS code plugins, and still there's a good number of them doing shady stuff.

Is this sarcasm? "rule the developer world" when Emacs/Vim still exist and are much more portable and battle tested?
As an Emacs enthusiast I agree with that (GP's) statement. VScode is usable for everyone from the start yet is capable to grow just like vim and in most meaningful ways just like Emacs.

I have a feeling that this approachability is what will win in the end.

It won't win me over, but my investment in Emacs can be measured in over 50kb of elisp code :)

Currently VS Code "rules the developer world" much more then Emacs and Vim combined so the OP is actually correct.

Most developers do not care to learn VIM/Emacs, myself included.

Doesn't look like it.

https://insights.stackoverflow.com/survey/2017#technology-mo...

I like VS code, but emacs and vim both have healthy, large user bases. Unless the only definition of a developer is "people writing SPAs"

I... huh... I'm not sure what to say here.

However statistics don't lie. Good bye 77kb emacs config, good bye editors wars. I enjoyed trolling you, VIM users, but today I saw the light.

I'm moving to Notepad++.

I'm moderately impressed, but I wonder why they would bother. I use VS Code as a powerful text editor and occasionally as a sorta JavaScript IDE. Java and .NET have fantastic IDEs already that are extremely hard to beat.
But what if you use JS and Java?

Your choices are (1) pay for IntelliJ Ultimate (several hundred) or (2) switch between IDEs or (3) abandon the IDE idea for both languages.

Eclipse and NetBeans still exist, and both understand JS.
I don't know if I'm the only one but I don't feel comfortable with Eclipse. It's a little bit bloated for my concern. But then again, under the hood VS Code uses eclipse as well
Correct me if I'm wrong but I think you're confusing Eclipse with Electron.
Our stack is primarily JS and Java. I pay for IntelliJ, well worth it. Plus I've been using PyCharm as well.
Curious, Javascript being a first class citizen in VS Code, what does your "real" Javascript IDE does that VS Code can't do?
Nothing. If anything, VS Code is one of the most complete Javascript IDE out there.

But I didn't interpret his comment that way. For me he wasn't saying that there's a better IDE Javascript than VS Code, but that there isn't any real IDE Javascript.

Which I tend to agree with. If we were talking about Typescript things might be different, but as far as Javascript goes, there's nothing on the level of what people are used when they talk about Java/C#/C++ IDEs.

You might want to use the same editor for your client-side JS and server-side JVM/.NET code.
That's what I thought. Eclipse for Java is still a really really good IDE which does everything. I think this is targeted towards the full stack engineers who occasionally move between IDE's.
Interesting. As a long time Visual Studio user, the clumsiness of Eclipse when forced on some projects was one of the things kept me backing away from a return to Java (back in my Java days, we used JBuilder).
IntelliJ is a much more polished experience.
I agree, but multi-team projects using Eclipse extensions made Eclipse mandatory :(.
IntelliJ is world class. Expensive, and world class.
There goes VS Code, once again taking the world by storm. One of Microsoft's most successful open source products of the decade
cant tell if serious or
What metric are we going by? If simply the number of "stars" VSCode easily beats out their other OSS, including Typescript and .NET

https://opensource.microsoft.com/?sort=Stars&tag=

Not sure if it is possible to do this, but one of the killer features for a Java IDE is automatically determining imports. Has anyone been able to get something like this working for Java on VS Code?
Unfortunately, the VS Code Java plugin doesn't have support for this yet. Here is the corresponding GitHub issue, which however hasn't seen much activity:

https://github.com/redhat-developer/vscode-java/issues/56

Nice! Is Scala supported too?
Or Kotlin? It sounded like this would be ”no” but ultimately it employs Eclipse JDT with this information:

”JDT Debug implements Java debugging support and works with any JDPA-compliant target Java VM. It is implemented on top of the language independent "debug model" provided by the platform debugger.”

... so I’m not sure anymore. Maybe someone with more experience can comment.

http://ensime.org/editors/vscode/

Also Dotty comes with built-in Language Server Protocol support.