Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Python 调试报错 #3155

Closed
zmyiy opened this issue Nov 10, 2023 · 9 comments
Closed

[BUG] Python 调试报错 #3155

zmyiy opened this issue Nov 10, 2023 · 9 comments
Assignees
Labels
🐞 bug Something isn't working v3 OpenSumi 3.0

Comments

@zmyiy
Copy link

zmyiy commented Nov 10, 2023

描述你的问题(Describe the bug)
此版本下,智能提示与 lint 都正常,但是 debug 调试会提示报错:The number of constructor arguments in the derived class s must be >= than the number of constructor arguments of its base class.

Error: The number of constructor arguments in the derived class s must be >= than the number of constructor arguments of its base class.
at /demo/extensions/python/out/client/debugger/debugAdapter/main.js:16:49625
at Array.forEach (<anonymous>)
at e (/demo/extensions/python/out/client/debugger/debugAdapter/main.js:16:49188)
at Object.t.plan (/demo/extensions/python/out/client/debugger/debugAdapter/main.js:16:49703)
at /demo/extensions/python/out/client/debugger/debugAdapter/main.js:16:46360
at e._get (/demo/extensions/python/out/client/debugger/debugAdapter/main.js:16:46269)
at e.get (/demo/extensions/python/out/client/debugger/debugAdapter/main.js:16:44980)
at a.get (/demo/extensions/python/out/client/debugger/debugAdapter/main.js:16:169479)
at new b (/demo/extensions/python/out/client/debugger/debugAdapter/main.js:1:230351)

复现路径(To Reproduce)
用 opensumi IDebugSessionManager.start 进行调试

预期表现(Expected behavior)

环境信息(Environment)

  • OS: [e.g. macOS 11.2 Apple M1/Windows10/Windows11]
  • Browser: [e.g. chrome, safari, electron]
  • OpenSumi Version: [e.g. 2.13.0]
@zmyiy zmyiy added the 🐞 bug Something isn't working label Nov 10, 2023
@zmyiy
Copy link
Author

zmyiy commented Nov 10, 2023

搜了下这个错误,需要升级 2020.8.xxx 版本才可以,但是经过测试最多只能升级到 2020.6.xxx 以下,超过智能提示与 lint 都无法运行。

@erha19 erha19 self-assigned this Nov 13, 2023
@erha19
Copy link
Member

erha19 commented Nov 13, 2023

我来看一下这个问题

@erha19 erha19 added the v3 OpenSumi 3.0 label Nov 13, 2023
@zhuzeyu22
Copy link
Contributor

我来看一下这个问题

@erha19 框架的调试模块感觉整体有问题,一些 vscode 的 lsp 相关的 example 也跑不起来

@erha19
Copy link
Member

erha19 commented Nov 24, 2023

@zhuzeyu22 这主要受 monaco 版本及插件 API 的适配有关系,需要具体问题具体看了,近期事情比较多,会逐步升一把 VS Code 内置插件,不过没那么快。

@erha19
Copy link
Member

erha19 commented Nov 27, 2023

@zhuzeyu22 @zmyiy 尝试了 2023 最新版本/ 2021 版本及 2020.10 版本,目前看下来适配 2020.10 的成本相对较低,插件内确实存在许多需要兼容的老逻辑,如 workbench.editorAssociations 在不同版本 VS Code 中存在不同默认值导致的问题及 Proposal API 等。

目前 2020.10 版本(2020.10.332292344)使用时会出现 crash 问题,原因是在插件激活过程中会发送一个较大的消息导致通信层奔溃,相关问题可参考这里展示的问题:
#3119 (comment)

待通信层改造能比较合理的解决该问题,否则需要对 Python 插件进行源码解读及修改,成本更高且不具备延续性。

@xkaede
Copy link
Contributor

xkaede commented Sep 21, 2024

试了下Opensumi-V3.3.0版本最高只能跑到2019.11.1,跑2020.6.1以上插件就会报“JavaScript heap out of memory”,不知道有没有计划解决这个问题。 @erha19

@hacke2
Copy link
Member

hacke2 commented Sep 21, 2024

pylance 是闭源插件,根据协议只能在 VSCode下使用,可以参照 #3600 ,我们适配了最近版本的开源平替插件

vscode-python 2024.5.11021008
pyright: 1.1.360
python-debuger: 2024.5.11001012

@xkaede
Copy link
Contributor

xkaede commented Sep 22, 2024

@hacke2 试了下pyright: 1.1.360,在输出报这个问题“The language client requires VS Code version ^1.86.0 but received version 1.68.0”

@xkaede
Copy link
Contributor

xkaede commented Sep 22, 2024

@hacke2 试了下pyright: 1.1.360,在输出报这个问题“The language client requires VS Code version ^1.86.0 but received version 1.68.0”

抱歉,看了下可以自己定义AppConfig. customVSCodeEngineVersion.已经没有问题了。

@hacke2 hacke2 closed this as completed Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working v3 OpenSumi 3.0
Projects
None yet
Development

No branches or pull requests

5 participants