MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / command

Method command

src/tools/debugadapter/debugmanager.cpp:180–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178}
179
180bool DebugManager::command(const QString &cmd, bool interrupt)
181{
182 bool restart = false;
183 if (d->debugger->isInferiorRunning()) {
184 if(!interrupt)
185 return false;
186 pauseDebugger();
187 restart = true;
188 }
189
190 auto tokStr = QString{"%1"}.arg(d->tokenCounter, 6, 10, QChar{'0'});
191 auto line = QString{"%1%2%3"}.arg(tokStr, cmd, "\n");
192 d->tokenCounter = (d->tokenCounter + 1) % 999999;
193 d->process->write(line.toLocal8Bit());
194 d->process->waitForBytesWritten();
195 QString sOut;
196 QTextStream(&sOut) << "Command:" << line << "\n";
197 d->debugger->handleOutputStreamText(sOut);
198
199 if (restart)
200 commandContinue();
201
202 return true;
203}
204
205void DebugManager::commandAndResponse(const QString& cmd,
206 const ResponseEntry::ResponseHandler_t& handler,

Callers 10

initMethod · 0.45
gotoLineMethod · 0.45
delAllTraceVariableMethod · 0.45
doItemMenuRequestMethod · 0.45
setupProjectMenuMethod · 0.45
setupFileMenuMethod · 0.45
existMethod · 0.45
slotBuildStateMethod · 0.45
createSpaceWidgetMethod · 0.45
createBuildMenuMethod · 0.45

Calls 5

waitForBytesWrittenMethod · 0.80
QTextStreamClass · 0.50
isInferiorRunningMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected