Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

How to restart Visual Studio for Mac after freezing

Discussion in 'General Discussion' started by Somian, Dec 6, 2018.

  1. Somian

    Somian

    Joined:
    Nov 22, 2011
    Posts:
    38
    Hi,

    Visual Studio for Mac freezes every now and then, usually when I open another file or when refactoring something.

    It will just beachball forever, so I try to kill it.

    Force-quit on the dock icon doesn't entirely work, however, it appears to be closed, but the process is still running.

    To make matters worse, it's impossible to kill it in the terminal.

    Romanos-iMac-Pro:~ somian$ kill 456
    Romanos-iMac-Pro:~ somian$ ps -ax | grep Visual
    456 ?? 0:00.00 (VisualStudio)
    1104 ttys000 0:00.00 grep Visual


    This means that every time visual studio froze (which may happen every 15 minutes), I need to restart my Mac!

    Is there a way to restart visual studio without having to reboot? (or preventing it from freezing all the time? x))

    Edit: it'll also keep showing up in the force-quit task window.
     

    Attached Files:

  2. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,091
    The
    kill
    command has a few different signals that it can send to an application to instruct it to stop running with the default signal being a "Gracefully shutdown, please". For apps that are completely frozen though you can send it a more forceful signal. Below should be the way to do it. Check the link for the complete list of signals.

    kill -9 456


    https://ss64.com/osx/kill.html
     
    Last edited: Dec 6, 2018
  3. Somian

    Somian

    Joined:
    Nov 22, 2011
    Posts:
    38
    Thanks, I totally forgot about this parameter

    using -9 closes the window. However, Visual studio won't restart after this and just bounces in the dock forever. Is there another process associated with visual studio?

    After a while it'll stop bouncing, but it then looks like this where I can only select "force quit" when right-clicking the dock, but it doesn't do anything.
     

    Attached Files:

    Last edited: Dec 9, 2018
  4. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    9,900
  5. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,732
    To offer some USEFUL advice instead of spam, in case this shows up in a Google search:

    Just use sudo killall VisualStudio. If you're using Code, you'll have to kill the Electron process.