mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-18 06:55:48 +03:00
Improve attach to "Run Target". Now it's possible to debug a terminal application by using this attach.
This commit is contained in:
@@ -419,6 +419,7 @@ void DebuggerPlugin::loadDAPConfig( const std::string& path, bool updateConfigFi
|
||||
dapConfig.name = config.value( "name", "" );
|
||||
if ( !dapConfig.name.empty() ) {
|
||||
dapConfig.request = config.value( "request", REQUEST_TYPE_LAUNCH );
|
||||
dapConfig.runTarget = config.value( "runTarget", false );
|
||||
dapConfig.args = config["arguments"];
|
||||
}
|
||||
if ( config.contains( "command_arguments" ) ) {
|
||||
@@ -1736,6 +1737,7 @@ void DebuggerPlugin::prepareAndRun( DapTool debugger, DapConfig config,
|
||||
int randomPort = Math::randi( 44000, 45000 );
|
||||
ProtocolSettings protocolSettings;
|
||||
protocolSettings.launchRequestType = config.request;
|
||||
protocolSettings.runTarget = config.runTarget;
|
||||
auto args = config.args;
|
||||
replaceKeysInJson( args, randomPort, solvedInputs );
|
||||
protocolSettings.launchArgs = args;
|
||||
@@ -2027,6 +2029,11 @@ void DebuggerPlugin::run( const std::string& debugger, ProtocolSettings&& protoc
|
||||
} );
|
||||
};
|
||||
|
||||
dap->runTargetCb = [this] {
|
||||
getUISceneNode()->runOnMainThread(
|
||||
[this] { getPluginContext()->runCommand( "project-run-executable" ); } );
|
||||
};
|
||||
|
||||
mDebugger->start();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user