Skip to content

Commit b7d7c73

Browse files
committed
Merge branch 'master' of github.com:EmmyLua/VSCode-EmmyLua
2 parents 824046d + 7e30c3b commit b7d7c73

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

README.md

+14-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ QQ交流群:`29850775` (最新版本以及部分视频演示在群文件中下
1414

1515
[CHANGELOG](CHANGELOG_EN.md)
1616

17-
FAQ:
17+
## FAQ:
1818

1919
Q: vscode-emmylua全家桶还有哪些?
2020

@@ -55,4 +55,16 @@ A: 原本的基于java的语言服务内存占用比较大, 另外存在各种
5555

5656
Q: 为什么没有文档?
5757

58-
A: 配置文件的文档见 https://github.com/CppCXY/EmmyLuaAnalyzer/blob/master/docs/.emmyrc.json_CN.md
58+
A: 配置文件的文档见 https://github.com/CppCXY/EmmyLuaAnalyzer/blob/master/docs/.emmyrc.json_CN.md
59+
60+
## FAQ – English:
61+
62+
Q: How can I enable remote debugging with EmmyLua?
63+
64+
A: ⓵ Load your Lua file in VSCode. ⓶ You need to "inject" the path to the debugging library and `require` it. Move to the top of your Lua code and activate the VSCode Command Palette and run the command **`EmmyLua: Insert Emmy Debugger Code`**; this injects code like this (appropriate for your particular OS):
65+
```lua
66+
package.cpath = package.cpath .. ";c:/User/Path/to/emmy_core/?.dll"
67+
local dbg = require("emmy_core")
68+
dbg.tcpListen("localhost", 9966)
69+
```
70+
⓷ Where you want to break, add a line **`dbg.waitIDE(); dbg.breakHere()`**. ⓸ Run your external program, this will block at the breakpoint, wating for a debugger to connect; so ⓹ activate the **`EmmyLua New Debug`** debug configuration to connect the debugger.

0 commit comments

Comments
 (0)