[DOCKER] Try remote debugging of Java with Remote Containers in Visual Studio Code Insiders

With reference to this article, I was impressed by running the remote debug environment of Nuxt.js, so I will try the same with Java. https://qiita.com/relu/items/defde8de8c4d21af662f

Environmental preparation

The environment used this time is as follows.

Tool name, etc. version
macOS Mojave 10.14.3
Docker 18.06.1-ce
Visual Studio Code Insiders 1.34.20-insider

Docker installation

If you have Homebrew installed, just command it. If you have not included it, please check it yourself.

$ brew install docker
$ brew cask install docker

Install Visual Studio Code Insiders

Only this.

#Install VSCode Insiders
$ brew cask install visual-studio-code-insiders

Let's put this extension in advance. remote.png

I will also include the Docker extension. (This is your choice.) docker.png

Development environment preparation

Get the source from:

$ git clone https://github.com/Microsoft/vscode-remote-try-java

Run from VSCode Insiders.

$ code-insiders vscode-remote-try-java

Then, the following dialog will be displayed, so press the button.

dialog.png

Debug execution

Open src / main / java / com / mycompany / app / App.java and set the breakpoint.

breakpoint.png

Press F5 to stop at the breakpoint!

debug.png

Summary

With just these steps, you can build a containerized Java development environment. This time, I just followed the official guidance, so I will learn the settings in detail and add it here.

Please wait for a while until the article is updated.

reference

https://code.visualstudio.com/docs/remote/containers

Recommended Posts

Try remote debugging of Java with Remote Containers in Visual Studio Code Insiders
Java in Visual Studio Code
[Mac] Install Java in Visual Studio Code
A record of setting up a Java development environment with Visual Studio Code
Try debugging a Java program with VS Code
[Mac] Install Java in Visual Studio Code (VS Code)
Getting started with Java programs using Visual Studio Code
Why can I develop Java with Visual Studio Code?
Build WebAPP development environment with Java + Spring with Visual Studio Code
Use PlantUML with Visual Studio Code
What I learned from doing Java work with Visual Studio Code
Try using the Wii remote with Java
Experience .NET 5 with Docker and Visual Studio Code
Fastest installation of Visual Studio Code on Ubuntu
Static code analysis with Checkstyle in Java + Gradle
Java.home cannot be set in visual studio code.
[Java] Explanation of Strategy pattern (with sample code)
Try using Sourcetrail (macOS version) in Java code
Get along with Java containers in Cloud Run
I couldn't type Japanese in Ubuntu20.04 + Visual Studio Code
Try to quit Eclipse and switch to Visual Studio Code
Output settings to debug console in Visual Studio Code
Remote debugging with Gradle test
Hot deploy with IntelliJ IDEA
Recognize Rails projects with Intellij idea
(Intellij) Hello World with Spring Boot
Swift beginner Debugging memo with Xcode
Develop Processing with IntelliJ + Kotlin + Gradle
Remote debugging of the Cognos SDK
Try remote debugging of Java with Remote Containers in Visual Studio Code Insiders
[Java] Connection with local DB (IntelliJ + SpringBoot)
(IntelliJ + gradle) Hello World with Spring Boot
Try using the Wii remote with Java
Try debugging natural language processing on Windows. with VS Code
Spring5 MVC Web application development with Visual Studio Code Environment construction (Installation of JDK11, Maven, Tomcat, Visual Studio Code)
Try using RocksDB in Java
Try DB connection with Java
Try calling JavaScript in Java
Try developing Spresense in Java (1)
Try functional type in Java! ①
Try gRPC with Java, Maven
Remote debugging with Gradle test
Write Java8-like code in Java8
Implementation of gzip in java
Implementation of tri-tree in Java
How to use PlantUML with Visual Studio Code (created on October 30, 2020)
Summary of steps for developing in Docker container with VS Code
Let me do VS Code Remote Development + Java development in Proxy environment
Source to display character array with numberPicker in Android studio (Java)