Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Injecting failed when debugging a unit test with Resharper in Visual Studio #96

Open
OregonGhost opened this Issue Apr 10, 2015 · 13 comments

Comments

Projects
None yet
3 participants
@OregonGhost
Copy link

OregonGhost commented Apr 10, 2015

ConEmu64 version preview 150327, alpha 150408
Windows 7 x64

When debugging a unit test over Resharper's test runner from within Visual Studio 2013 (latest update), the following message comes every time:

---------------------------
ConEmuC[64], PID=12628
---------------------------
ConEmuC.X, PID=12628
Injecting remote into PID=14660 from ParentPID=17400
FAILED, code=-113:0x00000000

Process: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Remote Debugger\x64\msvsmon.exe
Parent: devenv.exe
---------------------------
OK   
---------------------------

This is the message from 150408. 150327 had the same message box, but without the Process and Parent information.

It seems that msvsmon.exe is a console program that is used to allow the debugger to attach to the unit test runner, and ConEmu tries to attach to it as well.

I think that versions I had before (several months older) did not have this problem, so I'm not sure why this has been introduced.

Other than making ConEmu recognize this special situation, I could think of two workarounds that would greatly increase usability for me: 1. Make the message box some label or log in the ConEmu window, rather than popping up a message box or 2. Add an ignore list where I could enter msvsmon.exe in this case so it would not try to attach.

NOTE: I just checked that 140707 works fine in this situation.

@Maximus5

This comment has been minimized.

@OregonGhost

This comment has been minimized.

Copy link
Author

OregonGhost commented Apr 14, 2015

I'm not sure if that is the same, because you write that the debugger in VS has changed and ConEmu has not yet been adapted. But 140707 works fine, so it seems it's actually a regression in ConEmu.

I'm not sure where I'd start to debug that thing (just cloned the code and built the latest version), though I'd like to help you with this, because I'd really like to use a newer version because of all the other goodies :)

@Maximus5

This comment has been minimized.

Copy link
Owner

Maximus5 commented Apr 14, 2015

I've done some tests. First "broken" version was 141201. And I can't just revert the commit but need rewrite some stuff.

@Maximus5

This comment has been minimized.

Copy link
Owner

Maximus5 commented Apr 19, 2015

Have you tried latest alpha?

@cobrabr

This comment has been minimized.

Copy link

cobrabr commented Jul 27, 2015

I have the same problem, and not just with VS (running the latest alpha version, 150722 as of this post). I will collect some screenshots/error messages and post them here for reference.

@cobrabr

This comment has been minimized.

Copy link

cobrabr commented Jul 27, 2015

Here's one I got when opening a file's history on GitExtensions:

---------------------------
ConEmuC64, PID=25444
---------------------------
ConEmuC64.X, PID=25444
Injecting remote into PID=14332 from ParentPID=7596
FAILED, code=-300:0x00000000

Process: C:\Program Files (x86)\GitExtensions\GitExtensions.exe
Parent: GitExtensions.exe
---------------------------
OK   
---------------------------
@cobrabr

This comment has been minimized.

Copy link

cobrabr commented Jul 28, 2015

One more, this time from XYplorer (apparently being called by VS 2013) :

---------------------------
ConEmuC, PID=16668
---------------------------
ConEmuC.X, PID=16668
Injecting remote into PID=24948 from ParentPID=9160
FAILED, code=-300:0x00000000

Process: C:\Program Files (x86)\XYplorerFree\XYplorerFree.exe
Parent: devenv.exe
---------------------------
OK   
---------------------------
@Maximus5

This comment has been minimized.

Copy link
Owner

Maximus5 commented Jul 28, 2015

I need at least exact steps and settings to reproduce that.

@cobrabr

This comment has been minimized.

Copy link

cobrabr commented Jul 29, 2015

I don't have any exact steps -- it's very random. I can send you my ConEmu.xml for the settings, however.

@Maximus5

This comment has been minimized.

Copy link
Owner

Maximus5 commented Jul 29, 2015

Randomness is bad...
Well, than I need the following

  1. OS and user details (admin/non-admin, one user per all processes or some were elevated for example, something else may be...)
  2. Screenshot of your DefTerm settings or the whole xml file.
  3. Details about the moment the problem appears next time:
  • Take a look at process three (in ProcessExplorer) to determine if all PIDs are alive and the fact if ConEmuHk*.dll is loaded in all mentioned processes. Make screenshot of process tree with PIDs visible.
  • If possible, I wish to get MemoryDumps of ConEmuC and the process in which ConEmuHk was failed to be injected.

Also, do you use "Aggressive mode"? Try to disable it.

@cobrabr

This comment has been minimized.

Copy link

cobrabr commented Jul 29, 2015

OS: Win 7 x64
User: Admin, no UAC

Config:
image

For the details, I'll go to Process Explorer once the issue pops up again (ProcExp is always running in the background anyway 😄). And I'll see about grabbing the memory dumps as well.

As you can see in the screenshot, I had Aggresive Mode enabled, but I have just disabled it. I'll keep you posted.

@Maximus5

This comment has been minimized.

Copy link
Owner

Maximus5 commented Feb 7, 2016

What's about latest preview?

@cobrabr

This comment has been minimized.

Copy link

cobrabr commented Feb 9, 2016

I haven't seen this particular issue come up, but every time I upgrade ConEmu, every hooked executable that I have open crashes. Turning off Aggressive Mode seems to have helped with the original issue, though...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.