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

Forcing ConEmu as default terminal for a debugged process does not work #998

Open
Maximus5 opened this issue Jul 31, 2015 · 14 comments
Open

Comments

@Maximus5
Copy link
Owner

Originally reported on Google Code with ID 998

OS version: Win7 x64
ConEmu version: 130314

*Bug description*
Enabling "Force ConEmu as default terminal for console applications" and "Register
on OS startup" and adding devenv.exe, just like in the example, to the list of hooked
executables, makes new console processes started from Visual Studio use ConEmu. This
does, however, not work when starting the process with debugging. It does work when
started with "Start without debugger". Tested with Visual Studio 2010 SP1.

*Steps to reproduction*
1. Add devenv.exe to the hook list.
2. Start a console application from within Visual Studio, with debugging.
3. The process will start with the Windows console, ConEmu shows the following message:

---------------------------
ConEmuC: PID=8160
---------------------------
AttachConsole(PID=1380) failed, code=31
---------------------------
OK   
---------------------------



Reported by Floechen.news@gmx.de on 2013-03-20 14:17:10

@Maximus5
Copy link
Owner Author

Ha! ConEmu is too fast :D
The error occures before real console window appears onscreen.
Need to put some delay in my code...

Reported by ConEmu.Maximus5 on 2013-03-20 15:41:50

@Maximus5
Copy link
Owner Author

130320

Reported by ConEmu.Maximus5 on 2013-03-20 21:23:16

@Maximus5
Copy link
Owner Author

Thanks, seems to work. But while starting without debugging will immediately open a
ConEmu tab, starting with debugging will pop up the console and then switch to ConEmu
one or two seconds later. It works, even though it is not beautiful. It would be perfect
if you could hide the original console window or something, but I guess one cannot
have everything ;)

Reported by Floechen.news@gmx.de on 2013-03-21 13:52:30

@Maximus5
Copy link
Owner Author

That is expected behavior.
While debugging - ConEmu may not replace CreateProcess command line. You don't want
to debug ConEmu itself, right? :D
That's why lag may be while reattaching.

However, it is possible to start console hiden.
May be later...

Reported by ConEmu.Maximus5 on 2013-03-21 14:11:30

  • Status changed: Fixed

@Maximus5
Copy link
Owner Author

OK, got it. It's fine right now, just the window showing up for a short amount of time
:)

Reported by Floechen.news@gmx.de on 2013-03-21 14:42:58

@Maximus5
Copy link
Owner Author

Bad news: It works *most of the time*. Sometimes an empty ConEmu tab shows up (the real
console is away then), and there's no output in there. The debugged process seems to
work fine though, and ConEmu closes the tab when I stop the debugger, so it seems it
caught the process correctly. Just no output visible.

Reported by Floechen.news@gmx.de on 2013-03-21 15:12:03

@Maximus5
Copy link
Owner Author

Reported by ConEmu.Maximus5 on 2013-03-21 15:40:20

  • Status changed: New

@Maximus5
Copy link
Owner Author

I stand corrected: It works in about 50% of the tries. The tab stays open even when
the debugged process is closed, always. When starting the debugger again, the non-working
tab is reused by the new process.

Reported by Floechen.news@gmx.de on 2013-03-21 18:26:12

@Maximus5
Copy link
Owner Author

1. What is on "Info" page of Settings dialog (screenshot) when such empty tab appears?
Also, attach screenshot of ConEmu with this tab (status bar is interesting).
2. Create memory dumps of appropriate processes (ConEmu64, ConEmuC64) and apload them
somewhere (e.g. dropbox).
3. Depress Ctrl+Win+Alt+Space (real console must appears), does it shows anything?
Does keyboard input is redirected from ConEmu to your console?

Reported by ConEmu.Maximus5 on 2013-03-21 18:33:59

@Maximus5
Copy link
Owner Author

1. Attached the screenshots. If you need certain settings for the status bar, I can
make another screenshot with the settings enabled.
2. How do I do that? ;) I also don't have an account for upload anywhere.
3. Nothing happens on that key combination. Note that I'm currently on a MacBook Pro
with Windows, so some keys may work differently than expected - I can try again when
I'm back at my office. Do I need a special setting for this? Note that I pressed a
key in the ConEmu tab that normally quits the application, but nothing happens, so
it does not forward anything.

Reported by Floechen.news@gmx.de on 2013-03-22 08:39:54


- _Attachment: conemu-bug.PNG
![conemu-bug.PNG](https://storage.googleapis.com/google-code-attachments/conemu-maximus5/issue-998/comment-10/conemu-bug.PNG)_ - _Attachment: conemu-bug-info.PNG
![conemu-bug-info.PNG](https://storage.googleapis.com/google-code-attachments/conemu-maximus5/issue-998/comment-10/conemu-bug-info.PNG)_

@Maximus5
Copy link
Owner Author

Note that the process I blacked out in the settings screen shot is not the process to
be debugged, the debugged process is actually not in that list.

Reported by Floechen.news@gmx.de on 2013-03-22 08:40:40

@Maximus5
Copy link
Owner Author

ok

Reported by ConEmu.Maximus5 on 2013-03-22 09:34:59

@Maximus5
Copy link
Owner Author

Additional info: The 50% success rate is on a slower system (older Laptop). On a fast
system, the success rate is about 100%, so it seems to be a timing issue.

Reported by Floechen.news@gmx.de on 2013-07-15 11:29:26

@Maximus5
Copy link
Owner Author

140612

Reported by ConEmu.Maximus5 on 2014-06-13 02:31:50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant