Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to debug scala sbt project in vs code

Tags:

scala

sbt

I am trying to debug sbt project in vs code. I have downloaded vs code extension name scala metals. How to explicitly add build.sbt folder path in scala metal.

like image 424
dharmesh singh Avatar asked Nov 16 '22 15:11

dharmesh singh


1 Answers

How to explicitly add build.sbt folder path in scala metal

Open the root of your Scala project via VSCode, and Metals should detect your build.sbt and ask you if you want to load it. Otherwise you can do it explicitly from the Command Palette (Ctrl+Shift+P) and write "Metals Import Build"

how to debug scala sbt project in vs code

Not sure how to do it via metals. But the way I do it, is to open sbt myself from the terminal, via sbt -jvm-debug 5005. Then I attach VSCode remote debugger. You'll have to install "Debugger for Java" VSCode plugin too.

like image 101
tabdulradi Avatar answered Jan 01 '23 09:01

tabdulradi