   "Show debug information."
   (interactive)
   (when ycmd-mode
-    (let ((buffer (current-buffer)))
+    (let ((buffer (current-buffer))
+          (pos (point)))
 
       (deferred:$
-        (let ((content (ycmd--standard-content buffer)))
+        (let ((content (ycmd--standard-content buffer pos)))
           (ycmd--request
            "/debug_info"
            content

and blocks until the request has finished."
  (when ycmd-mode
    (let* ((buffer (current-buffer))
           (extra-content (and ycmd-force-semantic-completion
                               'force-semantic))
           (content (ycmd--standard-content-with-extras
                     buffer extra-content)))
      (ycmd--request
       "/completions"
       content

        ("line_num" . ,line-num)
        ("column_num" . ,column-num)))))

(defun ycmd--standard-content-with-extras (buffer pos &optional extras)
  "Generate 'standard' content for BUFFER at POS with EXTRAS."
  (let ((standard-content (ycmd--standard-content buffer pos)))
    (unless (listp extras)
      (setq extras (list extras)))
    (dolist (extra extras standard-content)
