Skip to content

Conversation

@fesily
Copy link
Contributor

@fesily fesily commented Jun 25, 2025

  1. specify debugger.platform
  2. add simple doc

Copy link
Contributor Author

@fesily fesily left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

linux有些分发系统可能会出现其他线程在独占底层的io互斥锁,导致popen不可用或者读出来是乱码

@actboy168
Copy link
Owner

通过start的参数传进来会更好

@fesily
Copy link
Contributor Author

fesily commented Jun 26, 2025

ok, 顺带添加了一个文档

@fesily fesily changed the title initialize PLATFORM variable directly from environment specify debugger.platform, launch.lua check source maybe without '@', add simple doc Jun 26, 2025
@actboy168
Copy link
Owner

lua-debug本体依赖了调试目标必须严格遵守lua的chunkname规范。否则就算launch.lua支持了这个特殊规则,调试的时候也会出错。

@fesily
Copy link
Contributor Author

fesily commented Jun 26, 2025

lua-debug本体依赖了调试目标必须严格遵守lua的chunkname规范。否则就算launch.lua支持了这个特殊规则,调试的时候也会出错。

我知道,但是我看debugger.lua里面已经做了这个处理,我现在也遇到了这个问题, 在lua层面返回的source是不带@, 但是CAPi返回的带@

@fesily
Copy link
Contributor Author

fesily commented Jun 26, 2025

lua-debug本体依赖了调试目标必须严格遵守lua的chunkname规范。否则就算launch.lua支持了这个特殊规则,调试的时候也会出错。

我知道,但是我看debugger.lua里面已经做了这个处理,我现在也遇到了这个问题, 在lua层面返回的source是不带@, 但是CAPi返回的带@

可能更好的方案是 使用一个环境变量来处理这种情况 LUA_DEBUG_SOURCE_PREFIX

@actboy168
Copy link
Owner

debugger.lua的行为是如果不是@开头则不会采纳source里的值。

launch.lua的设计目的只是为了给调试器自带的那几个lua.exe提供服务,它不应该也没必要做得那么通用。包括debugger.lua写了那么多的检测逻辑,主要目的是为了让vscode启动lua.exe的参数更简洁一些。lua的生态这么碎片,作为一个运行在调试目标的lua脚本,不可能兼容所有的情形,对于特殊环境,最佳的方案就是实现自己的debugger.lua。

…aunch settings

add explanation for parameter transmission stages in DebuggerInit.md
@fesily fesily force-pushed the custom-lua-platform branch from 14fbbbd to 124b4c6 Compare June 27, 2025 01:10
@fesily fesily changed the title specify debugger.platform, launch.lua check source maybe without '@', add simple doc specify debugger.platform, add simple doc Jun 27, 2025
@fesily
Copy link
Contributor Author

fesily commented Jun 27, 2025

那就这样吧, 我回滚了

@actboy168 actboy168 merged commit 2bae990 into actboy168:master Jun 27, 2025
6 checks passed
@fesily fesily deleted the custom-lua-platform branch June 28, 2025 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants