 IF TEST is specified run mocha with a grep for just that test."
   (let ((path (or mocha-file mocha-project-test-directory))
         (target (if test (concat "--grep \"" test "\" ") ""))
-        (node-command (concat mocha-which-node (if debug " --debug=5858" "")))
+        (node-command (concat mocha-which-node (if debug (concat " --debug=" mocha-debug-port) "")))
         (options (concat mocha-options (if debug " -t 21600000"))))
     (concat mocha-environment-variables " "
             node-command " "

  :type 'string
  :group 'mocha)

(defvar mocha-project-test-directory nil)

(defvar node-error-regexp

    (mocha-run file test-at-point)))

;;;###autoload
(defun mocha-debug-at-point ()
  "Debug the current innermost 'it' or 'describe' or the file if none is found."
  (interactive)
