Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: User interface, silent errors if not connected #83

Closed
tinmarino opened this issue Jan 10, 2020 · 2 comments
Closed

Comments

@tinmarino
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Press f6 (Pause) or f10 (next) without connection gets an error message (here for f10)

Error detected while processing function vimspector#StepOver:
line    1:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home2/tourneboeuf/.vim/pack/bundle/opt/spector/python3/vimspector/debug_session.py", line 306, in StepOver
    if self._stackTraceView.GetCurrentThreadId() is None:
AttributeError: 'NoneType' object has no attribute 'GetCurrentThreadId'

Describe the solution you'd like

  1. Hide the error message with:
if self._stackTraceView is None or self._stackTraceView.GetCurrentThreadId() is None:

instead of

self._stackTraceView.GetCurrentThreadId() is None:
  1. Echo a nice little message MessageUser with a warning color asking him to connect first
  2. Autoconnect ?

Describe alternatives you've considered

  1. Do the first stepOver() is auto connecting if not connected ?
  2. Is is preferable to silence the error, and even no message

Additional context
My solution would be 1, 2, 3. I'd be glad to make those changes with your desired solution.

@puremourning
Copy link
Owner

Yeah this is a bug. I’ve know about it for ages but been too lazy to fix it. A simple fix is to just make the methods tolerate being called before connection. Im happy with silence or a little user message.

tinmarino added a commit to tinmarino/vimspector that referenced this issue Jan 10, 2020
Problem: issue puremourning#83 Python errors if pressing f3 - Pause and client is
not connected
Solution: Check input with @IfConnected wrapper that exit if self._connection
@puremourning
Copy link
Owner

This was fixed in #85 and #77

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants