Skip to content

Commit

Permalink
Improve error message when selected thread is not stopped
Browse files Browse the repository at this point in the history
Fixes #235
  • Loading branch information
yyoncho committed Mar 21, 2020
1 parent 67d3dfc commit 57c5ad8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions dap-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ thread exection but the server will log message."
(dap--resp-handler)
debug-session)
(dap--resume-application debug-session))
(lsp--error "There is no stopped thread?")))
(lsp--error "Currently active thread is not stopped. Use `dap-switch-thread' or select stopped thread from sessions view.")))

(defun dap-disconnect (session)
"Disconnect from the currently active session."
Expand All @@ -601,7 +601,7 @@ thread exection but the server will log message."
(dap--resp-handler)
debug-session)
(dap--resume-application debug-session))
(lsp--error "There is no stopped thread?"))))
(lsp--error "Currently active thread is not stopped. Use `dap-switch-thread' or select stopped thread from sessions view."))))

(defun dap-step-in ()
"Debug step in."
Expand All @@ -614,7 +614,7 @@ thread exection but the server will log message."
(dap--resp-handler)
(dap--cur-active-session-or-die))
(dap--resume-application (dap--cur-active-session-or-die)))
(lsp--error "There is no stopped thread?")))
(lsp--error "Currently active thread is not stopped. Use `dap-switch-thread' or select stopped thread from sessions view.")))

(defun dap-step-out ()
"Debug step in."
Expand All @@ -627,7 +627,7 @@ thread exection but the server will log message."
(dap--resp-handler)
(dap--cur-active-session-or-die))
(dap--resume-application (dap--cur-active-session-or-die)))
(lsp--error "There is no stopped thread?")))
(lsp--error "Currently active thread is not stopped. Use `dap-switch-thread' or select stopped thread from sessions view.")))

(defun dap-restart-frame (debug-session frame-id)
"Restarts current frame."
Expand All @@ -647,7 +647,7 @@ thread exection but the server will log message."
(progn
(when (dap--session-running debug-session)
(message "Disconnecting from %s" (dap--debug-session-name debug-session))
(dap-disconnect))
(dap-disconnect debug-session))
(dap-debug (dap--debug-session-launch-args debug-session)))
(user-error "There is session to restart")))

Expand Down

0 comments on commit 57c5ad8

Please sign in to comment.