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

mac下无法设置断点,无法启动调试 #2

Open
Joey-Lee opened this issue Nov 27, 2014 · 7 comments
Open

mac下无法设置断点,无法启动调试 #2

Joey-Lee opened this issue Nov 27, 2014 · 7 comments

Comments

@Joey-Lee
Copy link

我通过package方法成功安装了插件,根据Default (OSX).sublime-keymap的源码来看,应该是按F2设置断点,shift+F2启动调试,可无论怎么设置,Sublime就是没反映。求助解决方法,谢谢!

@toss156
Copy link

toss156 commented Nov 27, 2014

看了一下 py 里面的代码,shift+F2 是v3.2的quick的,修改了这部分代码以后重新执行还是没用。

(另外之前用debugger.lua 连过 eclipse,一旦用了debug以后,模拟器卡的飞起。感觉调试起来还不一定有直接 print 或者 printTable 方便)

@peter4431
Copy link
Owner

有一些要注意到,修改插件以后需要重启sublime。
因为插件修改后sublime的pluginhost会把插件重新执行一次,之前占用的端口就被使用了,所以可能造成刚修改以后不能设置断点。
因为quick现在版本启动方式太多,我会考虑插件不考虑启动,另外有个脚本启动。

@peter4431
Copy link
Owner

@toss156 模拟器卡有很多原因,之前我写这个插件使用同步通信的方式,也卡的飞起,现在修改以后用着蛮好,你没有启动模拟器成功,可以手动启动试试看。如果可以,可以改成调用启动脚本的,每个quick版本一个lancher.bat/lancher.sh
@Joey-Lee 修改插件目录里面的任何文件以后,重启一下看看。
我增加了说明。

@Joey-Lee
Copy link
Author

@peter4431 之前无法设置断点应该是快捷键与系统快捷键设置有冲突导致的,修改之后现在可以设置断点了,不过手动启动Player之后提示:[LUA ERROR] [string "/Games/demo/scripts/debugger.lua"]:3255: Cannot connect to 127.0.0.1:10000 : Invalid argument,重启Sublime也没效果。
我在main.lua里首行是这样设置的:require("debugger")("127.0.0.1", 10000, "luasoar",nil,"unix","/Games/demo"),应该是没问题的吧?另外说一下我用的quick-x还是2.2.5版本,不知道和这个环境有没有关系。

@peter4431
Copy link
Owner

@Joey-Lee 我测试过使用2.2.4是没有问题的,我用你环境测试下看看。更新后和2系列兼容了。python的端口用的是10240,所以如果你不修改.py文件,端口应该是10240.设置为10240,是为了避免和其他的调试器冲突。

@Joey-Lee
Copy link
Author

Joey-Lee commented Dec 1, 2014

@peter4431 端口修改为10240依然报之前的错误,没有修改.py文件。btw:这个端口究竟是和debugger.lua中的IDEPORT(默认为10000)一致呢?还是应该和LuaSoar.py中的第354行self.sock.bind(("", 10240))这个端口一致?

@peter4431
Copy link
Owner

@Joey-Lee 应该是10240,我是担心冲突所以改成10240了

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

No branches or pull requests

3 participants