Search Unity

Unity 4.3 debugging editor window, breakpoints don't work!

Discussion in 'Editor & General Support' started by 2FlyDreams, Nov 18, 2013.

  1. 2FlyDreams

    2FlyDreams

    Joined:
    Oct 18, 2013
    Posts:
    42
    Attached mono to unity, put breakpoints in my editor window class, run my editor window, mono don't stop at breakpoints. But if at the same time I put breakpoints at my mono behaviour class, and press play, breakpoints work for it, but for editor window still not.

    What I have tried:

    1) Close mono and unity, and open all again;
    2) Close mono and unity, watch in task manager for any mono or unity work (if they exist, kill them), then open all again;
    3) Refresh, rebuld and sync mono develop project;
    4) Restart computer;
    5) Put my editor window class in other folder from Editor folder, restart Unity and Mono, then put again in Editor folder.

    The only thing helped is "4" and "5", after restart, everything works fine for some time, and then again ... I am using Windows 8.1 pro.

    The interesting thing is that when i put breakpoints in my editor window class they are red, but after attaching mono to unity they become light red.
     
    Last edited: Nov 18, 2013
  2. aquapete

    aquapete

    Joined:
    May 7, 2013
    Posts:
    2
    I'm having the same problem. I'm also using windows 8.1 pro.
     
  3. Texaggie96

    Texaggie96

    Joined:
    Jan 23, 2009
    Posts:
    81
    This not limited to window 8.1 or editor windows. Breaks points are not working for me and I am using OSX 10.8.5 and Unity 4.3 Pro. After attaching the process to UnityDebugger in Monodevelop and then pressing Play in Unity, I get the infinite mac color wheel. The project otherwise runs fine in the editor. Something is wrong as I have never had a problem with debugging with Unity/Monodevelop before.
     
  4. m4a44

    m4a44

    Joined:
    Mar 13, 2013
    Posts:
    45
    I think it's got something to do with a DLL not loading properly. I remember seeing an error, then it stopped working...
     
  5. Saishy

    Saishy

    Joined:
    Jun 3, 2010
    Posts:
    79
    I'm having the same problem with windows 7.

    This basically shut down my project since I'm working with heavy math and minor tweaking and I can't debug ffs!

    Thanks unity!
     
  6. Isbanan

    Isbanan

    Joined:
    Sep 12, 2012
    Posts:
    13
    I have this problem too, with the latest version to date: 4.3.1
     
  7. Kyle Cavasos

    Kyle Cavasos

    Joined:
    Nov 5, 2013
    Posts:
    1
    I'm on windows 7 and I have the same problem.
    I had an error about not being able to load a dll, and from that point forward I haven't been able to get breakpoints to trigger. I've tried rebooting, restarting unity, and starting the unity project from monodevelop. Nothing works. I'm in the middle of some heavy math stuff as well, and being forced to use only Debug.log() will make this a pretty painful process.
     
  8. Yukichu

    Yukichu

    Joined:
    Apr 2, 2013
    Posts:
    420
    Have you tried running your project from UnityEditor, then attaching MonoDevelop debugger to the process, rather than starting the project in debug mode from MonoDevelop? Just a thought.
     
  9. beginnerOlle

    beginnerOlle

    Joined:
    Dec 2, 2013
    Posts:
    1
    I have the same problem, there was a dll error, something about "unable to move file.." and after that no more debugging for me. I'm using win Xp and uity 4.3.1.
     
  10. Heisenbug

    Heisenbug

    Joined:
    Aug 31, 2012
    Posts:
    40
    BUMP.

    Any clue? I have the same problem with Unity 4.3.2 and Windows 7. Last time I solved removing completely unity from the pc, including folders in AppData and registry key. Unfortunately I haven't still been able to reproduce this issue and submit a bug report.
     
  11. eezSZI

    eezSZI

    Joined:
    Nov 16, 2012
    Posts:
    121
    Same thing here. Error popup then debugging stopped working.

    I opened a different project and debugging works there. Went back and the original project still doesn't work.
     
  12. eezSZI

    eezSZI

    Joined:
    Nov 16, 2012
    Posts:
    121
    This worked for me:
    -Close Unity
    -Go to project directory/Library and delete the "ScriptAssemblies" folder
    -Open Unity (it will regenerate that folder) and now it works again
     
    corretjerdev, soulpsq and gm2008 like this.
  13. chrismarch

    chrismarch

    Joined:
    Jul 24, 2013
    Posts:
    472
    I ran into this a few times yesterday, while editing a custom editor script and debugging it. I've attached a picture of the Unity dialog that appears before the issue with breakpoints not working occurs.
    $Assembly-CSharp-Editor.png
     
  14. eezSZI

    eezSZI

    Joined:
    Nov 16, 2012
    Posts:
    121
    Nice grab! That's what I'm seeing as well.

    Every time I see that now, I hit force quit. Depending on what you are doing that isn't always possible or a good idea, but it keeps debugging from breaking. :)
     
  15. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    973
    When that happens, disconnect from the debugger and hit try again. This started happening in 4.3, I don't know if it's MonoDevelop 4.x keeping the files open while connected to the debugger or a newly introduced Unity bug, I suspect the former rather than the latter.

    If you have pressed cancel and it broke debugging, disconnect from the debugger, delete the ScriptAssemblies folder and recompile.
     
    Last edited: Jan 16, 2014
  16. NinjaCat

    NinjaCat

    R&D Minion

    Joined:
    Aug 22, 2013
    Posts:
    69
    Hi. Please report the bug and post the case number here.
     
  17. senc01a

    senc01a

    Joined:
    Dec 26, 2012
    Posts:
    5
    This is horrible. Completely unacceptable.
    I've been having this since version 4.3, We are already in 4.3.4 and still the same issues.
    FIX THIS or we will have to move to another engine, ONE IN WHICH YOU CAN ACTUALLY PROGRAM.
     
  18. Aurore

    Aurore

    Director of Real-Time Learning

    Joined:
    Aug 1, 2012
    Posts:
    3,106
    Was there a bug number for this at all so I can track it?
     
  19. zenforhire

    zenforhire

    Joined:
    Nov 5, 2012
    Posts:
    65
    Thanks eezSZI !

    Your solution worked for me.
    Been having the "moving file failed" with the 4.3.4 build.
    I sometimes wonder if this is an engine for hobby use.
     
  20. TheValar

    TheValar

    Joined:
    Nov 12, 2012
    Posts:
    760
    I've just run into this same issue out of the blue... How did you guys manage to fix debugging after it stopped working? I've restarted my PC and it still won't work.

    Gotta say, for the past couple months Unity has been insanely buggy... freezes constantly but it was always stuff I could live with until this.
     
  21. EpicCel

    EpicCel

    Joined:
    Dec 22, 2013
    Posts:
    1
    This started for me yesterday! Getting Pink Breakpoint the moment I Attach Mono to Unity?
    And to make things even weirder, It happens on both my Laptop and Desktop. I have tried building a new project with some new C# and same thing.

    Note that If I run Unity from Monodevelop, I get the following Error in the Console:
    Couldn't set project path to: D:\ my project path???

    Also note that I tried multiple new projects on multiple drives. Same thing, pink breakpoint?!?

    Has anyone found a solution! I cannot work anymore.
     
  22. TieSKey

    TieSKey

    Joined:
    Apr 14, 2011
    Posts:
    225
    So? is there a bug report? this is a real work stopper

    Ff was blocking the search box.
    and I cant find a "search box" on the issue tracking....
    The work around proposed didn't help either.

    How can an issue tracker not have a search function?!?!?! (the combo filters are just that, filters, not a search feature).

    Seriously, I love Unity but if you keep shipping versions with such bugs, depend on a completely outdated IDE and focus more on new features than product stability (since version 3.0 where I started using Unity stability keeps decreasing) we can't consider it a real market competitor......
     
    Last edited: Jul 5, 2014
  23. Texaggie96

    Texaggie96

    Joined:
    Jan 23, 2009
    Posts:
    81
  24. Archie888

    Archie888

    Joined:
    May 17, 2014
    Posts:
    41
    I suspect that the "Moving File Error" stems from MonoDevelop still having the script file open while one focuses to Unity, and Unity is supposed to start compilation. Could this be the reason? For me, closing MonoDevelop and then pressing Try Again has helped. If I click the other choices, I will lose the ability to debug line-by-line (transparent breakpoints), and I only get the ability back by re-opening Unity and MD, or perhaps even by rebooting.
     
  25. Archie888

    Archie888

    Joined:
    May 17, 2014
    Posts:
    41
    I think I have found the exact scenario to reproduce the "Moving File Failed" error. :) When I modify code in MonoDevelop, hit Save, directly attach debugger, and only after this focus on Unity for compilation, I seem to always get this error.

    Was there a bug case number for this one?

    My Unity version is 4.3.4f1.
     
  26. Archie888

    Archie888

    Joined:
    May 17, 2014
    Posts:
    41
    Ok, now I notice that whenever the debugger is connected and code is saved, this issue occurs. I think one should be able to change code when connected as well, however.
     
  27. gm2008

    gm2008

    Joined:
    Aug 8, 2014
    Posts:
    19
    @eezSZI, Thanks. Your solution works for me.

    I tried with restarting Windows, reinstalling Unity. Neither worked. Only eezSZI's solution worked.
     
  28. gooncorp

    gooncorp

    Joined:
    Dec 30, 2011
    Posts:
    131
    yea this is still not fixed