replace 'debug.breakpoint' with 'debug.pause'

This commit is contained in:
MihailRis
2025-10-08 23:11:10 +03:00
parent 8f56969997
commit 4f6a443fa3
4 changed files with 21 additions and 18 deletions
+8 -10
View File
@@ -213,15 +213,17 @@ bool DebuggingServer::performCommand(
return false;
}
void DebuggingServer::onHitBreakpoint(dv::value&& stackTrace) {
void DebuggingServer::pause(std::string&& message, dv::value&& stackTrace) {
if (connection == nullptr) {
return;
}
connection->send(dv::object({
{"type", std::string("hit-breakpoint")},
{"stack", std::move(stackTrace)}
}));
if (stackTrace != nullptr) {
connection->send(dv::object({
{"type", std::string("hit-breakpoint")},
{"message", std::move(message)},
{"stack", std::move(stackTrace)}
}));
}
engine.startPauseLoop();
}
@@ -245,10 +247,6 @@ void DebuggingServer::sendValue(
}));
}
void DebuggingServer::pause() {
engine.startPauseLoop();
}
void DebuggingServer::setClient(u64id_t client) {
this->connection =
std::make_unique<ClientConnection>(engine.getNetwork(), client);