You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Read-Eval-Print Loop (REPL) is an interactive interpreter to a programming language. It originated with LISP systems, but many other languages (Python, Ruby, Haskell, Tcl, etc.) use REPL's to manage interactive sessions. They allow for simple experimentation with a language by bypassing the compile stage of the code -> compile -> execute cycle.
There are 4 components to a REPL:
A read function, which reads input from the keyboard
An eval function, which evaluates code passed to it
A print function, which formats and displays results
A loop function, which runs the three previous commands until termination
In short, it starts an interactive console where you can type in expressions and immediately see the result of these expressions.
REPL can't interact directly with your debugger (which means it can't send instructions directly) - this is done using DAP (Debug Adapter Protocol) (in nvim, nvim-dap) through exposed APIs.
Version confirmation
Neovim version
NVIM0.8.2
Operating system/version
archlinux,dwm
Terminal name/version
alacritty
$TERM environment variable
No response
Branch info
main (Default/Latest)
Fetch Preferences
SSH (use_ssh = true)
How to reproduce the issue
debugpy是用pacman在终端里安装的,没有用mason安装debugpy,在调试python代码时,用快捷键比如(space+d+r)可以正常调试,但是在dap-repl窗口,用.next命令,就不正常,dap-repl窗口输出以下信息:
dap> .n
dap>
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm.py", line 1195, in internal_evaluate_expression_json
pydevd_vars.evaluate_expression(py_db, frame, expression, is_exec=True)
File "/usr/lib/python3.10/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_vars.py", line 370, in new_func
return _run_with_unblock_threads(original_func, py_db, curr_thread, frame, expression, is_exec)
File "/usr/lib/python3.10/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_vars.py", line 334, in _run_with_unblock_threads
return _run_with_interrupt_thread(original_func, py_db, curr_thread, frame, expression, is_exec)
File "/usr/lib/python3.10/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_vars.py", line 305, in _run_with_interrupt_thread
return original_func(py_db, frame, expression, is_exec)
File "/usr/lib/python3.10/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_vars.py", line 548, in evaluate_expression
compiled = _compile_as_exec(expression)
File "/usr/lib/python3.10/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_vars.py", line 412, in _compile_as_exec
return compile(expression_to_evaluate, '', 'exec', _ASYNC_COMPILE_FLAGS)
File "", line 1
.n
^
SyntaxError: invalid syntax
dap>
是不是还需要其他设置呢?
Expected behavior
希望在dap-repl窗口下能用指令控制调试过程.
Actual behavior
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: