(type?: string, msg?: string)
| 1836 | } |
| 1837 | |
| 1838 | protected quitEvent(type?: string, msg?: string) { |
| 1839 | this.quit = true; |
| 1840 | if (traceThreads) { |
| 1841 | this.handleMsg('log', '**** quit event\n'); |
| 1842 | } |
| 1843 | if (msg && type) { |
| 1844 | this.handleMsg(type, msg); |
| 1845 | } |
| 1846 | if (this.server && this.server.isProcessRunning()) { |
| 1847 | // A gdb quit may be happening with VSCode asking us to finish or a crash or user doing something |
| 1848 | this.serverConsoleLog('quitEvent: Killing server'); |
| 1849 | this.server.exit(); |
| 1850 | } |
| 1851 | setTimeout(() => { |
| 1852 | // In case GDB quit because of normal processing, let that process finish. Wait for,\ |
| 1853 | // a disconnect response to be sent before we send a TerminatedEvent();. Note that we could |
| 1854 | // also be here because the server crashed/quit on us before gdb-did |
| 1855 | try { |
| 1856 | this.sendEvent(new TerminatedEvent()); |
| 1857 | this.serverConsoleLog('quitEvent: sending VSCode TerminatedEvent'); |
| 1858 | } |
| 1859 | catch (e) { |
| 1860 | } |
| 1861 | }, 10); |
| 1862 | } |
| 1863 | |
| 1864 | protected serverQuitEvent() { |
| 1865 | if (this.miDebugger.isRunning() && !this.quit) { |
no test coverage detected