orbitalquark / textadept-debugger

Language debugging module for Textadept.
MIT License
8 stars 0 forks source link

Module 'socket' not found: no field package.preload['socket'] #1

Closed 9Demien9 closed 2 years ago

9Demien9 commented 2 years ago

Hello! Copy files ~/textadept/modules/debugger Add require('debugger') to init.lua After launching textadept, I get: lua: ~/textadept/modules/debugger/init.lua:902: module 'socket' not found: no field package.preload['socket'] no file '../textadept/modules/debugger/lua/socket.lua' no file '../.textadept/modules/debugger/lua/socket.lua' no file '../.textadept/modules/socket.lua' no file '../.textadept/modules/socket/init.lua' no file '../textadept/modules/socket.lua' no file '../textadept/modules/socket/init.lua' no file '..g/textadept/core/socket.lua' no file '/usr/share/lua/5.4/socket.lua' no file '/usr/share/lua/5.4/socket/init.lua' no file '/usr/lib/lua/5.4/socket.lua' no file '/usr/lib/lua/5.4/socket/init.lua' no file '' no file '../textadept/modules/debugger/lua/socket.so' no file '../.textadept/modules/debugger/lua/socket.so' no file '../.textadept/modules/socket.so' no file '../textadept/modules/socket.so' no file '/usr/lib/lua/5.4/socket.so' no file '/usr/lib/lua/5.4/loadall.so' no file '' SocketLua the system has installed, Lua version 5.3 require('socket') from other files *.lua it works

For debugger version lua must be at least 5.4?

p.s. Install lua 5.4 nothing worked

orbitalquark commented 2 years ago

Please download a release zip, which contains a pre-built socket module and copy that into your ~/.textadept/modules. That's the easiest way to make it work. Otherwise, you will need a socket.so compiled for Lua 5.4 and placed in /usr/lib/lua/5.4, according to package.cpath.

9Demien9 commented 2 years ago

Yes, it worked at least in graphical mode, thanks a lot! True, I didn't do it very smart myself, I installed the debugger from https://github.com/orbitalquark/textadept-debugger . Now I just copied the debugger from textadept_11.4.modules.zip and everything worked. I didn't even install the sockets module.

You are doing a very good thing, thank you!

9Demien9 commented 2 years ago

When trying to debug in curses mode , I get: lua: ../textadept/modules/debugger/lua/init.lua:66 not implemented in this environment

orbitalquark commented 2 years ago

Unfortunately, the terminal version does not support _G.timeout(), which the Lua debugger makes use of.

9Demien9 commented 2 years ago

Well, okay, it's still a very cool development. Good luck to you!

orbitalquark commented 2 years ago

Closing because the original issue was resolved by downloading a release zip.