MCPcopy Create free account
hub / github.com/SpartanJ/eepp / getDebugServer

Function getDebugServer

src/tools/ecode/plugins/debugger/debuggerplugin.cpp:1954–1972  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1952}
1953
1954std::optional<Connection> getDebugServer( nlohmann::json& json ) {
1955 auto debugServerInt = json_get_if<int>( json, KEY_DEBUG_SERVER );
1956
1957 if ( debugServerInt )
1958 return Connection{ *debugServerInt, "localhost" };
1959
1960 auto debugServerStr = json_get_if<std::string>( json, KEY_DEBUG_SERVER );
1961 if ( debugServerStr ) {
1962 int port;
1963 if ( String::isNumber( *debugServerStr ) && String::fromString( port, *debugServerStr ) )
1964 return Connection( port, "localhost" );
1965
1966 auto split = String::split( *debugServerStr, ':' );
1967 if ( split.size() == 2 && String::fromString( port, split[1] ) )
1968 return Connection( port, split[1] );
1969 }
1970
1971 return {};
1972}
1973
1974void DebuggerPlugin::prepareAndRun( DapTool debugger, DapConfig config,
1975 std::unordered_map<std::string, std::string> solvedInputs ) {

Callers 2

prepareAndRunMethod · 0.85
runMethod · 0.85

Calls 3

fromStringFunction · 0.85
ConnectionClass · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected