Reply To: Debugging Support for Lua

Home Forums General Programming Debugging Support for Lua Reply To: Debugging Support for Lua

#30358
synth
Participant
  • Topics: 13
  • Replies: 35
  • Total: 48

ok, that helped.

It seems the ‘os’ library is required now as mobdebug uses it :

--
-- MobDebug 0.60
-- Copyright 2011-14 Paul Kulchenko
-- Based on RemDebug 1.0 Copyright Kepler Project 2005
--

-- use loaded modules or load explicitly on those systems that require that
local require = require
local io = io or require "io"
local table = table or require "table"
local string = string or require "string"
local coroutine = coroutine or require "coroutine"
-- protect require "os" as it may fail on embedded systems without os module
local os = os or (function(module)
  local ok, res = pcall(require, module)
  return ok and res or nil
end)("os")

local mobdebug = {....

I tried :

lua_pushcfunction(luaState, luaopen_os);
lua_pushliteral(luaState, "os");
lua_call(luaState, 1, 0);

That compiles but it crashes with memory leaks in Juce.

Ctrlr