More fixes.

This commit is contained in:
Martín Lucas Golini
2025-01-16 00:47:21 -03:00
parent 9a0f86f946
commit 6fe9d34c4a
7 changed files with 108 additions and 11 deletions

View File

@@ -875,7 +875,7 @@ void DebuggerPlugin::sendPendingBreakpoints() {
sendFileBreakpoints( pbp );
mPendingBreakpoints.clear();
if ( mDebugger )
mDebugger->resume( 1 );
mDebugger->resume( mListener->getCurrentThreadId() );
}
void DebuggerPlugin::sendFileBreakpoints( const std::string& filePath ) {
@@ -1194,15 +1194,12 @@ void DebuggerPlugin::drawLineNumbersBefore( UICodeEditor* editor,
bool DebuggerPlugin::setBreakpoint( const std::string& doc, Uint32 lineNumber ) {
Lock l( mBreakpointsMutex );
auto sdc = getStatusDebuggerController();
if ( sdc && sdc->getWidget() == nullptr ) {
sdc->show();
sdc->hide();
}
initStatusDebuggerController();
if ( !mBreakpointsModel )
mBreakpointsModel = std::make_shared<BreakpointsModel>( mBreakpoints, getUISceneNode() );
auto sdc = getStatusDebuggerController();
if ( sdc && sdc->getUIBreakpoints()->getModel() == nullptr )
sdc->getUIBreakpoints()->setModel( mBreakpointsModel );
@@ -1427,6 +1424,14 @@ DebuggerPlugin::debuggerBinaryExists( const std::string& debugger,
return cmd;
}
void DebuggerPlugin::initStatusDebuggerController() {
auto sdc = getStatusDebuggerController();
if ( sdc && sdc->getWidget() == nullptr ) {
sdc->show();
sdc->hide();
}
}
void DebuggerPlugin::run( const std::string& debugger, ProtocolSettings&& protocolSettings,
DapRunConfig&& runConfig, int /*randPort*/ ) {
std::optional<Command> cmdOpt = debuggerBinaryExists( debugger, runConfig );