Comments (10)
This may be because your chunkname does not comply with the general rules of Lua. The general format for a Lua chunkname is aaa/b/ccc.lua. You can check the chunkname by printing debug.getinfo(1).source or use dbg.breakHere() to forcefully break and inspect it. If you are developing with Unity's xLua, you can modify the custom loader. If you are using a different framework, you can try modifying the usage of the lua loadbuffer interface.
from intellij-emmylua.
This is what I printed out with debug.getinfo
@UI/UIVillage
but the break point still didnt worked.
from intellij-emmylua.
you can try dbg.breakHere()
, this code needs to be inserted after dbg.tcpConnect
, is your editor Rider?
from intellij-emmylua.
Yes I'm using Rider. I notice some of my lua file used . instead of /. Will it affect the file that i going to debug which is using /?
from intellij-emmylua.
It is correct to use require 'aaaa.bbbbbbbb.cccccc'
in the code, but the corresponding chunkname needs to be changed to a/b/c
. Have you tried using dbg.breakHere()
?
from intellij-emmylua.
dbg.breakHere() do work however I cant step over etc for it
from intellij-emmylua.
Files outside of the assets may not be indexed by Rider. You can try using other editors like Visual Studio Code or IntelliJ IDEA.
from intellij-emmylua.
I see.. I will test out others.
I using Xlua in Unity. Is this what you mean by modify custom loader?
luaEnv.AddLoader((ref string filePath) => ReadFile(filePath));
private static byte[] ReadFile(string path)
{
if (path == "emmy_core")
return null;
path = path.Replace('.', '/');
var fileFullPath = $"{FileService.GetAssetRootPath()}/lua_root/{path}.lua";
return System.IO.File.ReadAllBytes(fileFullPath);
}
from intellij-emmylua.
You can take a look at the documentation for the AddLoader
function. It requires you to return the real path to filePath
. In other words, you need to modify the ReadFile
parameter to be ref string path
and assign fileFullPath
to path
.
from intellij-emmylua.
thanks
from intellij-emmylua.
Related Issues (20)
- EmmyLua 1.4.7-IDEA231, automatic suggestions are not working HOT 3
- Crash and not index file on 1.4.8 HOT 9
- 只能调试一个lua文件 HOT 3
- Code completion not as complete as in 1.3.7.2 HOT 2
- New debugger: step over works like step into, step into crashes HOT 1
- New Debugger crashes on connect
- 代码提示会使idea卡顿并报错
- Issue with autocompletion HOT 3
- Issue with types HOT 1
- Issue with self. code completion HOT 1
- Addition assignment flagged as invalid HOT 2
- Creation of new project do nothing HOT 3
- Remove unused local function HOT 4
- PyCharm freezes when using a live template with a colon HOT 1
- 编辑器卡顿,无法重命名 HOT 4
- 使用.var导致编辑器卡死 HOT 7
- 1.4.[9-11]-IDEA231 crashes at startup on CLion 2023.3.2 HOT 4
- Macros cannot be used in the working directory of the run configuration. HOT 1
- 1.4.11 代码补全问题 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from intellij-emmylua.