Once you accept this, you can visit your running application via the provided URL:
You can view the console output in the Debug tab at the bottom of the screen.
Stop the server
To stop a running app from running, use the command Button at the top of your screen:
The Harbor The tab at the bottom of the screen lists all running projects and reminds you which URL leads to which project. From there you can stop any project.
How about some Kotlin?
I was on one Kotlin kick So lately we’ve been trying something more exotic for VS Code and importing a Kotlin project to work on it. To import the project, I follow the same basic steps as for the .NET HTMX project:
Running the Kotlin project requires a bit more fiddling to figure out. First I right click on the imported one build.gradle.kts
File. This will result in a context menu containing “Gradle” along with a Execute task Option. Opening it leads to another context menu where I have the option to run a Gradle task. I’m typing run
and the console gives the expected output when starting the server:
When I open the port I can see my application running. After a page refresh, the Gradle extension provides a Gradle tab on the left side of my screen with drop-down menus showing tasks like Run. Running the Kotlin app required a few extra steps, but it wasn’t laborious.
VSCode.dev with GitHub codespaces
Another approach supported by VSCode.dev is running projects with GitHub Codespacesa managed cloud hosting environment. Codespaces is a cloud development environment like GitPod. You get 60 hours of development time for free and then charge based on the type of VM you use.
In VSCode.dev, open the file Remote Explorer area on the left side of your screen. Choose GITHUB CODESPACE and click Create space:
After another set of permissions, you will get access to your repositories in GitHub as shown in the screenshot above. I choose MTyson/iw-java-spring-react from my repository and then from the master branch and then 2 cores with 8GB RAM from the options provided.
This will open a new window with a Codespaces version of VS Code. It is offered to install a recommended extension for this repository (extension pack for Java), which I accept. This is followed by a walkthrough of configuring the environment, starting with the installation of a JDK.
Luckily, Codespaces is included SDKMan already installed, so it’s easy to upgrade Java version 11 (which is already installed) to Java 21 (which I used for my Spring React project). From the terminal I type:
$ sdk install java 21.0.2-open
Once this is complete I can run the project with:
$ maven spring-boot:run
Similar to running the application in VSCode.dev is the Harbor The tab shows the running application and provides access to the user interface. We can also manage the running app via codespaces. When you’re ready to shut down Codespaces, return to the main VSCode.dev page and use the Remote Explorer Menu.
Container-based development has some differences from tunneling to the VM, particularly in terms of the lifecycle of the image and its container nature. Otherwise the development experience is similar.
Diploma
VSCode.dev opens up some new possibilities specifically for a browser-based IDE. In addition to the flexibility of coding from anywhere, VSCode.dev can turn any cloud machine into a development platform and give you full IDE interaction with your projects in the cloud. It also supports multiple developers using the same environment for a collaborative social coding experience.
Overall, VSCode.dev is a great addition to your development toolkit.