Skip to content

Commit

Permalink
add dap-java-vm-args custom variable to allow define which vm args wi…
Browse files Browse the repository at this point in the history
…ll be used to define the debug templates for the dap-java-debug function (#450)
  • Loading branch information
mauricio-ms authored Aug 27, 2023
1 parent 70d2d3c commit bc89297
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dap-java.el
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@
:group 'dap-java
:type 'string)

(defcustom dap-java-vm-args nil
"VmArgs which will be used for debug configuration."
:group 'dap-java
:type 'string)

(defcustom dap-java-compile-port 33000
"The debug port which will be used for compile/attach configuration.
If the port is taken, DAP will try the next port."
Expand Down Expand Up @@ -231,6 +236,7 @@ initiate `compile' and attach to the process."
(defun dap-java--populate-default-args (conf)
"Populate all of the fields that are not present in CONF."
(setq conf (plist-put conf :type "java"))
(plist-put conf :vmArgs dap-java-vm-args)

(setq conf (pcase (plist-get conf :request)
("launch" (dap-java--populate-launch-args conf))
Expand Down

0 comments on commit bc89297

Please sign in to comment.