Skip to content

python代码调试时,在dap-repl下调试指令不能用 #416

@hhcwyx

Description

@hhcwyx

Version confirmation

  • Confirm

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    dapDebug Adapter related issuesinvalidThis doesn't seem rightusageUser-specific issues

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions