简体   繁体   English

在 WSL 上使用 Java 和 Sbt (Scala) 的 VSCode for Play 框架

[英]VSCode for Play framework using Java and Sbt (Scala) on WSL

I have been trying to setup a 'Play Framework' code base on my Visual Studio Code.我一直在尝试基于我的 Visual Studio Code 设置“Play Framework”代码。 The code is written in Java and uses Sbt(Scala) to download references\/packages, compile and run.该代码是用 Java 编写的,并使用 Sbt(Scala) 来下载引用\/包、编译和运行。 I have installed the 'Java extension pack' and the 'Sbt plugin' by lightbend on VsCode.我已经在 VsCode 上安装了 lightbend 的“Java 扩展包”和“Sbt 插件”。 The 'sbt compile' and 'sbt run' runs fine and I am able to run the application using 'sbt compile' 和 'sbt run' 运行良好,我可以使用

"sbt -jvm-debug 5005 'run 9001'"

I know it has been a long time since the question has been asked but I just wanted to share what worked for me.我知道这个问题已经有很长时间了,但我只是想分享对我有用的东西。

This seems to be a problem with the project setup in Visual Studio Code and not necessarily a problem with the Debug configuration.这似乎是 Visual Studio Code 中项目设置的问题,不一定是 Debug 配置的问题。 I setup the Play Framework project in VSC as it is explained here (especially the changes in the pom.xml file) and it worked great for me.我在 VSC 中设置了 Play Framework 项目,正如这里所解释的那样(尤其是pom.xml文件中的更改),它对我来说非常有用。 I was even able to run the application in Debug mode and evaluate the variables just fine.我什至能够在调试模式下运行应用程序并很好地评估变量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM