microsoft / debugpy

An implementation of the Debug Adapter Protocol for Python
https://pypi.org/project/debugpy/
Other
1.87k stars 138 forks source link

code-server使用python-vscode调试时 The number of constructor arguments in the derived class s must be >= than the number of constructor arguments of its base class. (我通过自己的方式解决了,但我找不到具体的原因) #567

Closed sw3828 closed 3 years ago

sw3828 commented 3 years ago

Environment data

Actual behavior

启动code-server后,第一次访问页面做debug操作时正常。尝试刷新页面或关闭页面时,再次尝试debug会提示异常。

Debugger Error: The number of constructor arguments in the derived class s must be >= than the number of constructor arguments of its base class.
Debugger Error: The number of constructor arguments in the derived class s must be >= than the number of constructor arguments of its base class.
Error
Error: The number of constructor arguments in the derived class s must be >= than the number of constructor arguments of its base class.
    at /home/oppoer/.falcon/code-server-3.9.1-linux-x86_64/.share/extensions/ms-python.python-2020.5.80290/out/client/debugger/debugAdapter/main.js:16:49625
    at Array.forEach (<anonymous>)
    at e (/home/oppoer/.falcon/code-server-3.9.1-linux-x86_64/.share/extensions/ms-python.python-2020.5.80290/out/client/debugger/debugAdapter/main.js:16:49188)
    at Object.t.plan (/home/oppoer/.falcon/code-server-3.9.1-linux-x86_64/.share/extensions/ms-python.python-2020.5.80290/out/client/debugger/debugAdapter/main.js:16:49703)
    at /home/oppoer/.falcon/code-server-3.9.1-linux-x86_64/.share/extensions/ms-python.python-2020.5.80290/out/client/debugger/debugAdapter/main.js:16:46360
    at e._get (/home/oppoer/.falcon/code-server-3.9.1-linux-x86_64/.share/extensions/ms-python.python-2020.5.80290/out/client/debugger/debugAdapter/main.js:16:46269)
    at e.get (/home/oppoer/.falcon/code-server-3.9.1-linux-x86_64/.share/extensions/ms-python.python-2020.5.80290/out/client/debugger/debugAdapter/main.js:16:44980)
    at a.get (/home/oppoer/.falcon/code-server-3.9.1-linux-x86_64/.share/extensions/ms-python.python-2020.5.80290/out/client/debugger/debugAdapter/main.js:16:169479)
    at new b (/home/oppoer/.falcon/code-server-3.9.1-linux-x86_64/.share/extensions/ms-python.python-2020.5.80290/out/client/debugger/debugAdapter/main.js:1:230351)
    at /home/oppoer/.falcon/code-server-3.9.1-linux-x86_64/.share/extensions/ms-python.python-2020.5.80290/out/client/debugger/debugAdapter/main.js:1:233593

我尝试根据社区提供的相关问题的解决方案,coder-serer升级为3.4.1,python-vsocde升级为2020.5.86806,依然无法解决问题。

经过我长时间的探索,通过一个很简单的办法解决了它,但我不明白具体是什么原因导致这个异常。

我的解决方案: cod-server启动后 cp code-server-3.4.0-linux-x86_64/.share/data/User/state/globa.json /home/work/globa.json 当出现这个异常的时候 rm code-server-3.4.0-linux-x86_64/.share/data/User/state/globa.json cp /home/work/globa.json code-server-3.4.0-linux-x86_64/.share/data/User/state/globa.json 刷新网页 就可以正常debug 如果再次出现该问题 重复 rm code-server-3.4.0-linux-x86_64/.share/data/User/state/globa.json cp /home/work/globa.json code-server-3.4.0-linux-x86_64/.share/data/User/state/globa.json

sw3828 commented 3 years ago

image 我替换globa.json后 image 问题解决了
image

fabioz commented 3 years ago

This seems like an issue in the client (either vscode-python or vscode itself), not really on debugpy.

@karthiknadig would you like to transfer this to vscode-python?

sw3828 commented 3 years ago

这似乎在客户端(无论是客户端vscode-python还是客户端vscode)中都是一个问题,并不是真正的问题debugpy

您想将@karthiknadig转移给vscode-python

是的 我将复制到vscode-python中