Esempio n. 1
0
    def _Reset(self):
        self._logger.info("Debugging complete.")
        if self._uiTab:
            self._logger.debug("Clearing down UI")

            del vim.vars['vimspector_session_windows']
            vim.current.tabpage = self._uiTab

            self._splash_screen = utils.HideSplash(self._api_prefix,
                                                   self._splash_screen)

            self._stackTraceView.Reset()
            self._variablesView.Reset()
            self._outputView.Reset()
            self._codeView.Reset()
            vim.command('tabclose!')
            self._stackTraceView = None
            self._variablesView = None
            self._outputView = None
            self._codeView = None
            self._remote_term = None
            self._uiTab = None

        # make sure that we're displaying signs in any still-open buffers
        self._breakpoints.UpdateUI()
Esempio n. 2
0
    def _LoadThreadsIfReady(self):
        # NOTE: You might think we should only load threads on a stopped event,
        # but the spec is clear:
        #
        #   After a successful launch or attach the development tool requests the
        #   baseline of currently existing threads with the threads request and
        #   then starts to listen for thread events to detect new or terminated
        #   threads.
        #
        # Of course, specs are basically guidelines. MS's own cpptools simply
        # doesn't respond top threads request when attaching via gdbserver. At
        # least it would apear that way.
        #
        # As it turns out this is due to a bug in gdbserver which means that
        # attachment doesn't work due to sending the signal to the process group
        # leader rather than the process. The workaround is to manually SIGTRAP the
        # PID.
        #
        self._splash_screen = utils.HideSplash(self._api_prefix,
                                               self._splash_screen)

        if self._launch_complete and self._init_complete:
            for h in self._on_init_complete_handlers:
                h()
            self._on_init_complete_handlers = []

            self._stackTraceView.LoadThreads(True)
Esempio n. 3
0
    def handler( *args ):
      self._splash_screen = utils.HideSplash( self._api_prefix,
                                              self._splash_screen )

      if callback:
        self._logger.debug( "Setting server exit handler before disconnect" )
        assert not self._run_on_server_exit
        self._run_on_server_exit = callback

      vim.eval( 'vimspector#internal#{}#StopDebugSession()'.format(
        self._connection_type ) )