Dont break if there's no debuggers attached.
This commit is contained in:
parent
0094a5937f
commit
a2d8293c04
|
@ -5,7 +5,6 @@
|
|||
#include "DebugAdapterProtocol/Requests.hpp"
|
||||
|
||||
void AngelscriptDebugger::Run(uint16_t port) {
|
||||
// Listen on port 9012
|
||||
_server = new asio::ip::tcp::acceptor(_ioContext, asio::ip::tcp::endpoint(asio::ip::tcp::v4(), port));
|
||||
std::thread([this]() { AcceptLoop(); }).detach();
|
||||
}
|
||||
|
@ -32,6 +31,9 @@ void AngelscriptDebugger::on_line_callback(asIScriptContext* ctx, AngelscriptDeb
|
|||
if (ctx->GetState() == asEXECUTION_SUSPENDED) {
|
||||
return;
|
||||
}
|
||||
if (!d->HasDebuggerAttached()) {
|
||||
return;
|
||||
}
|
||||
const char* scriptSection = nullptr;
|
||||
int column = 0;
|
||||
int line = ctx->GetLineNumber(0, &column, &scriptSection);
|
||||
|
@ -56,6 +58,9 @@ size_t GetBreakpointHash(const std::string& section, size_t line) {
|
|||
}
|
||||
|
||||
void AngelscriptDebugger::on_exception_callback(asIScriptContext* ctx, AngelscriptDebugger* d) {
|
||||
if (!d->HasDebuggerAttached()) {
|
||||
return;
|
||||
}
|
||||
ctx->Suspend();
|
||||
d->_pausedContexts.push_back(ctx);
|
||||
|
||||
|
|
Loading…
Reference in New Issue