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] 有些环境下使用launch.json 无法启动调试 #304

Open
hnwyllmm opened this issue Oct 24, 2023 · 4 comments
Open

[BUG] 有些环境下使用launch.json 无法启动调试 #304

hnwyllmm opened this issue Oct 24, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@hnwyllmm
Copy link
Collaborator

Describe the bug
A clear and concise description of what the bug is.
有些环境下,但是具体是哪个环境不知,猜测极可能是Windows+Docker,无法使用当前的launch.json启动调试程序,据反馈去掉externalConsole配置项,或者此配置项改为FALSE即可。

另外,鉴于环境的多样性,建议将lauch.json 改成示例配置文件,比如 lauch.json.example,让使用者主动修改配置来使用。

ref #302

@hnwyllmm hnwyllmm added the bug Something isn't working label Oct 24, 2023
@Selflocking
Copy link
Contributor

我想提供下 codelldb 的配置模板:

        {
            "type": "lldb", // 需安装 CodeLLDB 插件 
            "request": "launch",
            "name": "LLDB",
            "program": "${workspaceFolder}/${defaultBuildTask}/bin/observer",
            "cwd": "${workspaceFolder}/${defaultBuildTask}/",
            "args": [
                // 指定配置文件
                "-f",
                "${workspaceFolder}/etc/observer.ini",
                // 以cli的方式启动observer, 不需要客户端
                "-P",
                "cli",
                // 以 socket 方式启动
                // "-s",
                // "miniob.sock"
                // 以TCP方式启动
                // "-p",
                // "6789",
                // 是否启用 mvcc 事务
                // "-t",
                // "mvcc",
            ],
            // 启动时是否打开调试控制台
            "internalConsoleOptions": "neverOpen",
            // 是否每次启动前重新构建
            "preLaunchTask": "build_debug",
        },

@hnwyllmm
Copy link
Collaborator Author

你的配置相当赞👍🏻

@hnwyllmm
Copy link
Collaborator Author

根据@zhaoyiping 的建议,gdb的调试文件增加下面的配置

"setupCommands": [ { "description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true }, { "description": "Set Disassembly Flavor to Intel", "text": "-gdb-set disassembly-flavor intel", "ignoreFailures": true } ]

@hnwyllmm
Copy link
Collaborator Author

hnwyllmm commented Mar 12, 2024

在容器环境中调试时,因为配置文件中有"externalConsole: True"配置项导致点击调时按钮没有反应,去掉就正常了,请参考帖子:
https://ask.oceanbase.com/t/topic/35606814/9

可以把这个配置项放到"osx"中,既仅在Mac系统中启用:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants