actboy168 / lua-debug

Lua Debug Adapter for Visual Studio Code
MIT License
439 stars 95 forks source link

C++ attach 调试 #39

Closed qiuzijian7 closed 5 years ago

qiuzijian7 commented 5 years ago

我在C++中创建debugger,等待vscode链接,但是始终链接不上,请问我是哪里写错了么

    debugger_create("127.0.0.1:4278");
    debugger = debugger_get();
    debugger->wait_client();
    debugger->attach_lua(State);
qiuzijian7 commented 5 years ago

vscode中,launch.json配置如下: `{ "version": "0.2.0", "configurations": [

    {
        "name": "attach",
        "type": "lua",
        "request": "attach",
        "stopOnEntry": true,
        "ip": "0.0.0.0",
        "port": 4278
    }
]

}`

actboy168 commented 5 years ago

连接本地请用127.0.0.1

qiuzijian7 commented 5 years ago

用127.0.0.1也不行

qiuzijian7 commented 5 years ago

vscode使用的是x86版本的dll,我本地使用的是自己用源码编译出来的x64版本的dll,会是这个问题么

actboy168 commented 5 years ago

应该已经可以了

qiuzijian7 commented 5 years ago

抱歉~ 还是不行,创建debugger成功了,但还是连接不上,我想自己启动vscode-lua-debug来模拟vscodeIDE上attach的操作,请问,在console中,输入什么命令呢?

actboy168 commented 5 years ago

attach我测试是没问题的,也许你应该试下你的客户端和服务端之间是否能连通