Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Unity Hub and VSCode Debug

Discussion in 'Unity Hub' started by seec1, Jan 30, 2018.

  1. seec1

    seec1

    Joined:
    Jun 6, 2016
    Posts:
    8
    Hi there,
    First of all, thanks for useful tool. It's help me very much.

    When I use VSCode to debug my game, VSCode detect Unity and Unity Hub like a Editor
    This is error: Multiple targets with name 'Unity Editor' running. Unable to connect.

    Any idea to pass it?
    Thanks and best regards.
     
  2. AbrahamDUnity

    AbrahamDUnity

    Unity Technologies

    Joined:
    Jun 28, 2017
    Posts:
    379
    Hi,

    Thank you! We hope you enjoy the tool.

    As for the VSCode issue, we will investigate the problem. Which version of Unity/VSCode were you using when the problem occurred?
     
  3. Shizola

    Shizola

    Joined:
    Jun 29, 2014
    Posts:
    199
    Happening to me with 5.6.5.p1, vscode 1.19.3. If you attach via the command palette you I get a drop down like this:

    Unity Editor (Unity)
    Unity Editor (Unity Hub)
    Unity Editor (Unity Hub)
    Unity Editor (Unity Hub)

    To get around it on windows you have to kill the process from task manager even after you close Unity Hub.

    Cheers.
     
  4. AbrahamDUnity

    AbrahamDUnity

    Unity Technologies

    Joined:
    Jun 28, 2017
    Posts:
    379
    Thanks! We will look into it.
     
  5. EmilSVad

    EmilSVad

    Joined:
    Dec 7, 2016
    Posts:
    1
    if any others have the same problem you can fix it with changing you launch.json file in the .vscode folder so instead of the first part of the configuration begin

    {
    "name": "Unity Editor",
    "type": "unity",
    "request": "launch"
    }

    to

    {
    "name": "Unity Editor (Unity)",
    "type": "unity",
    "request": "launch"
    }
     
    RG_Keith, Its4u, seec1 and 2 others like this.
  6. seffles

    seffles

    Joined:
    Oct 2, 2013
    Posts:
    22
    This didn't work for me on MacOS, I still get the same error.
     
  7. joeksy

    joeksy

    Unity Technologies

    Joined:
    Jan 12, 2017
    Posts:
    139
    Hi,
    We are working on a solution. There will be an update on the "Debugger for Unity" VS code extension.
    Stay tuned!
     
    RG_Keith, seec1 and seffles like this.
  8. Dual-Pistolas

    Dual-Pistolas

    Joined:
    Oct 30, 2014
    Posts:
    16
    I was getting the same error on Windows 10, Unity 2017.3.0p4.

    Making that change to launch.json fixed it for me until the extension is updated.