Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lua/java-dap/setup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ end
function Setup:enrich_config(config)
config = vim.deepcopy(config)

-- Attach configs don't need enriching — the JVM is already running and
-- chose its own main class, classpath, and java executable. Without this
-- short-circuit, the `assert(main, ...)` below fires because attach
-- configs (correctly) have no mainClass.
if config.request == 'attach' then
return config
end

-- skip enriching if already enriched
if config.mainClass and config.projectName and config.modulePaths and config.classPaths and config.javaExec then
return config
Expand Down
Loading