1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 08:47:17 +01:00

Allow the option to toggle debugging from configuration file.

This commit is contained in:
Sandu Liviu Catalin 2016-06-17 03:33:58 +03:00
parent c76acc07dc
commit 6a31e9ee58
2 changed files with 7 additions and 1 deletions

View File

@ -59,6 +59,7 @@ Core::Core()
, m_ReloadPayload()
, m_IncomingNameBuffer(nullptr)
, m_IncomingNameCapacity(0)
, m_Debugging(false)
{
/* ... */
}
@ -160,6 +161,8 @@ bool Core::Initialize()
DefaultVM::Set(m_VM);
// Configure error handling
ErrorHandling::Enable(conf.GetBoolValue("Squirrel", "ErrorHandling", true));
// See if debugging options should be enabled
m_Debugging = conf.GetBoolValue("Squirrel", "Debugging", false);
LogDbg("Registering the standard libraries");
// Push the root table on the stack
@ -451,7 +454,7 @@ bool Core::LoadScript(CSStr filepath)
else
{
// Create a new script container and insert it into the script pool
m_Scripts.emplace_back(m_VM, path, false);
m_Scripts.emplace_back(m_VM, path, m_Debugging);
}
// At this point the script exists in the pool
return true;

View File

@ -390,6 +390,9 @@ private:
CStr m_IncomingNameBuffer; // Name of an incoming connection.
size_t m_IncomingNameCapacity; // Incoming connection name size.
// --------------------------------------------------------------------------------------------
bool m_Debugging; // Enable debugging features, if any.
public:
/* --------------------------------------------------------------------------------------------