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

Class Breakpoint

src/plugins/debugger/debug.h:290–439  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

288};
289
290struct Breakpoint : public BaseBreakpoint, public IInnerBreakpoint
291{
292 Breakpoint(
293 QUrl &uri,
294 dapNumber lineNumber,
295 dap::optional<dapNumber> column,
296 bool enabled,
297 dap::optional<dap::string> condition,
298 dap::optional<dap::string> hitCondition,
299 dap::optional<dap::string> logMessage,
300 dap::any adapterData,
301 const std::string &id = QUuid::createUuid().toString().toStdString())
302 : BaseBreakpoint(enabled, hitCondition, condition, logMessage, id), _uri(uri), _lineNumber(lineNumber), _column(column), _adapterData(adapterData)
303 {
304 }
305
306 bool isDirty(QUrl uri)
307 {
308 Q_UNUSED(uri)
309 // Not support dirty check now.
310 return false;
311 }
312
313 dapNumber lineNumber()
314 {
315 if (verified() && data && data.value().line) {
316 return data.value().line.value();
317 }
318 return _lineNumber;
319 }
320
321 bool verified()
322 {
323 if (data) {
324 return data.value().verified && !isDirty(_uri);
325 }
326 return true;
327 }
328
329 QUrl getUriFromSource(dap::Source source, dap::optional<dap::string> path, dap::string sessionId)
330 {
331 Q_UNUSED(path)
332 Q_UNUSED(sessionId)
333 return QUrl(source.path->c_str());
334 }
335
336 QUrl uri()
337 {
338 if (verified() && data && data.value().source) {
339 return getUriFromSource(data.value().source.value(), data.value().source.value().path, data->sessionId);
340 }
341 return _uri;
342 }
343
344 dap::optional<dap::integer> column()
345 {
346 if (verified() && data && data.value().column) {
347 return data.value().column;

Callers 1

currentBreakpointMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected