-
Firstly I have the following in my metals_config.on_attach = function(client, bufnr)
require("metals").setup_dap()
end
dap.configurations.scala = {
{
type = "scala",
request = "launch",
name = "Run",
metals = {
runType = "run"
}
},
{
type = "scala",
request = "launch",
name = "Test File",
metals = {
runType = "testFile"
}
},
{
type = "scala",
request = "launch",
name = "Test Target",
metals = {
runType = "testTarget"
}
},
} When I run What is the right way to run this sbt command with arguments and hit the breakpoint I've set? Thank you in advance. Note: I previously asked a very similar question here. The one thing I never got out of it was how to pass arguments to jobs though. #162 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Just to clarify, but jobs here do you mean main methods? If you've triggered a
You may also want to toggle your repl when you're doing this if you're not already via As for the args that you want to pass into run, you'll actually include them in the {
type = "scala",
request = "launch",
name = "Run",
metals = {
runType = "run",
args = { "firstArg", "secondArg", "thirdArg" }
}
} |
Beta Was this translation helpful? Give feedback.
Just to clarify, but jobs here do you mean main methods? If you've triggered a
Run
here then Metals will either automatically run the build target you're in if there is only one main method or will give you a choice to choose with main method you'd like to run.You may also want to toggle your repl when you're doing this if you're not already via
require"dap".repl.toggle()
.As for the args that you want to pass into run, you'll actually include them in the
metals
…