show error in logs when sourceMaps are set incorrectly#314
show error in logs when sourceMaps are set incorrectly#314jpeletier wants to merge 3 commits intoactboy168:masterfrom
Conversation
|
Why did you arrive here? This function should only be executed by Lua5.4. lua-debug/extension/script/backend/worker/variables.lua Lines 1319 to 1321 in 070cf2a |
|
Thank you for the clue. I found the issue. "sourceMaps": [
[
"${workspaceFolder}/*"
]
],This made the code in lua-debug/extension/script/backend/worker/source.lua Lines 31 to 38 in 070cf2a throw an exception, since pattern[2] was nil.
Then, the code you mention was defaulting to I repurposed the PR so the configuration is now checked. If the user forgets to add the mapping, it will throw a useful error in the logs: if pattern[1] == nil or pattern[2] == nil then
error(("Invalid source map entry. Check sourceMaps property in launch.json, entry #%d"):format(i - 1))
end |
|
Thank you. But it is still difficult for users to easily perceive errors when initializing the backend. A better approach is to check on the frontend. |
|
Ah, wonderful. I didn't know about that part of the code. |
Thank you for this project, it is a hidden gem. I have just found about it and now I can debug my Lua code!
This PR is a small fix so that variables are shown in the VSCode debugger VARIABLES window when debugging a LuaJIT target.
The following error was shown in the logs:
rdebug.getinfo(frameId, "r", info)is not implemented for LuaJIT, softransferandntransferare not populated.With this fix I can now inspect all the variables, globals and upvalues!