Jump to content
Der schöne Günther

Can you restart the LSP or do you have to restart the whole IDE?

Recommended Posts

After we had migrated a project from 10.0 Seattle to 10.4 without any issues and it was working great, we have now migrated the next (bigger) project by 95 %. However, we are constantly having trouble with code completion in 10.4.1, it often stops working completely.

 

As code completion appears to be a separate process, we have three "DelphiLSP.exe" living besides the good old "bds.exe". When code completion stops working, I thought terminating these processes would trigger the IDE to restart them. But this doesn't happen.

 

Do I have another option besides completely shutting down the IDE, opening it again, loading the project and navigating to where I just left off?

Edited by Der schöne Günther

Share this post


Link to post
10 minutes ago, Der schöne Günther said:

Do I have another option besides completely shutting down the IDE, opening it again, loading the project and navigating to where I just left off?

You would have to ask Embarcadero to confirm, but AFAIK no.  The IDE creates the LSP processes and expects them to stay running, so if they die unexpectedly behind the IDE's back, a restart of the IDE is likely needed.

  • Thanks 1

Share this post


Link to post

Then I wonder what the point of outsourcing them into separate processes was.

Maybe a cheap way of prolonging running out of memory for the 32 bit IDE process 😀

 

Oh well...

Edited by Der schöne Günther

Share this post


Link to post
3 minutes ago, Der schöne Günther said:

Maybe a cheap way of prolonging running out of memory for the 32 bit IDE process

Also now it's running in separate process and will not bring / or slow / down the IDE. You can use the IDE to edit your code while the LSP processes are doing their jobs.

Share this post


Link to post
Guest
9 hours ago, Der schöne Günther said:

Do I have another option besides completely shutting down the IDE, opening it again, loading the project and navigating to where I just left off?

... look some options on IDE tool:

http://docwiki.embarcadero.com/RADStudio/Sydney/en/Code_Insight_Reference

 

by default LSP is enabled... but

 

Delphi: you can choose the Code Insight Manager from either Classic or Language Server Protocol.Note:

The Code Insight Manager lists all managers registered with the IDE.

Delphi: you can choose the Code Insight Manager from either Classic or Language Server Protocol.

C++: you cannot change the Code Insight Manager. It uses the Classic or LSP automatically for the Classic or Clang compilers.

Edited by Guest

Share this post


Link to post

 

6 hours ago, Der schöne Günther said:

Do I have another option besides completely shutting down the IDE, opening it again, loading the project and navigating to where I just left off?

You can switch to the Classic Code Insight and then back to LSP.

  • Like 1

Share this post


Link to post

A quick note to anyone looking at this thread. You probably would have figured this out on your own, but, looking at the Task Manager, it appears that when you re-select the LSP on the Options screen, you have to close and re-open any open project for the IDE to re-launch the LSP.



 

Share this post


Link to post
2 hours ago, Rafael Dipold said:

I can confirm that Uwe's solution works. I've been using it for a long time without any problems. The IDE automatically restarts the LSP if/when it dies (apparently they expected it to crash occasionally).

Share this post


Link to post
1 hour ago, Uwe Raabe said:

Delphi 12 already has a separate menu item for this unter Tools.

Well, at least they are self-aware. Always an important step toward fixing problems 🙂

  • Like 5

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×