-
Notifications
You must be signed in to change notification settings - Fork 7
The server crashed 5 times in last 3 minutes #27
Comments
First off I want to say. I'm sorry you are experiencing this! Unfortunately, at this time there isn't a great story around debugging these sorts of errors. Would you be able to provide me with either the code or a snippet of the code, that reproduces the issue? If so I'd probably be able to quickly turn something around for you. |
I didn't write any code, just an empty file. If manually changing file type from plain text to swift, I get this crash |
Could you please write the steps you take to debug server app.
Only one time server stopped at breakpoint. Then I tried a lot of times and nothing happend, the server just crashes and no breakpoints stops. |
Never mind, found solution. I should attach as root not as user. |
Not sure why running as root should be necessary. I never need to do that to make it work. 🤔 I'll go ahead and write up how I debug/develop this package. 👨💻 Xcode (e.g., langserver-swift)In my langserver-swift local clone I generate an Xcode project.
I then open the generated project in Xcode. From there I make a few changes to the way the debugger attaches to the program. See the screenshot below. I then build and run the program. Xcode should report something like "Waiting to attach to LanguageServer : LanguageServer". VSCode (e.g., vscode-swift)In my vscode-swift local clone I open VScode (e.g., I then start the TypeScript compiler or the build task (e.g., ⇧⌘B or Tasks: Run Build Task). Figure out where Xcode built the
Get the fully qualified path then open
Once this is complete you should be able to open the VSCode debugger and and select Caveats
My recommendation is to put a break-point in
It is worth noting two things:
FinallyThank you for the feedback and question! I hope that provides a enough information to be useful to someone. I'm going to try and transfer this answer into the README for both vscode-swift and language-server as I think it'll lower the barrier to entry to someone else who experiences a problem such as yours. Again thank you for the question! 🙏 Edit on May 11, 2017I figured out how to get the path the debug executable using |
Thank you 👍. |
Again thanks a lot man, It was EXTREMELY usefull. |
Glad you found it useful! Hopefully you can find the cause of the crash. Even if you can't fix it if you can document it then I might be able to help you. |
I have forked both projects, the vscode-swift and langserver, when trying to run vscode-swift , I get this error
And here is the top of backtrace :
The text was updated successfully, but these errors were encountered: