| 141 | } |
| 142 | |
| 143 | DAPDebugger::DAPDebugger(QObject *parent) |
| 144 | : AbstractDebugger(parent), d(new DebuggerPrivate()) |
| 145 | { |
| 146 | qRegisterMetaType<OutputPane::OutputFormat>("OutputPane::OutputFormat"); |
| 147 | qRegisterMetaType<StackFrameData>("StackFrameData"); |
| 148 | qRegisterMetaType<StackFrames>("StackFrames"); |
| 149 | |
| 150 | qRegisterMetaType<IVariable>("IVariable"); |
| 151 | qRegisterMetaType<IVariables>("IVariables"); |
| 152 | qRegisterMetaType<dpf::Event>("dpf::Event"); |
| 153 | qRegisterMetaType<RunState>("RunState"); |
| 154 | |
| 155 | d->sessionSrv = dpfGetService(SessionService); |
| 156 | d->localSession = new DebugSession(debugService->getModel(), this); |
| 157 | d->currentSession = d->localSession; |
| 158 | connect(d->currentSession, &DebugSession::sigRegisterHandlers, this, &DAPDebugger::registerDapHandlers); |
| 159 | d->rtCfgProvider.reset(new RunTimeCfgProvider(this)); |
| 160 | |
| 161 | connect(debuggerSignals, &DebuggerSignals::receivedEvent, this, &DAPDebugger::handleEvents); |
| 162 | |
| 163 | QDBusConnection sessionBus = QDBusConnection::sessionBus(); |
| 164 | sessionBus.connect(QString(""), |
| 165 | "/path", |
| 166 | "com.deepin.unioncode.interface", |
| 167 | "dapport", |
| 168 | this, SLOT(slotReceivedDAPPort(QString, int, QString, QMap<QString, QVariant>))); |
| 169 | |
| 170 | sessionBus.connect(QString(""), |
| 171 | "/path", |
| 172 | "com.deepin.unioncode.interface", |
| 173 | "output", |
| 174 | this, SLOT(slotOutputMsg(const QString &, const QString &))); |
| 175 | |
| 176 | initializeView(); |
| 177 | |
| 178 | launchBackend(); |
| 179 | } |
| 180 | |
| 181 | DAPDebugger::~DAPDebugger() |
| 182 | { |