Debug Logs on Windows - The Easy Guide

Got a ReactOS tutorial to share? Drop it in here

Moderator: Moderator Team

Webunny
Posts: 1201
Joined: Sat Apr 28, 2012 1:30 pm

Re: Debug Logs on Windows - The Easy Guide

Post by Webunny »

Black_Fox wrote:
milon wrote:I actually got a little lost with the named pipes. Isn't that a Linux thing?
No, named pipes are normal in Windows:
Wikipedia wrote:The Windows NT family of operating systems support named pipe clients and servers.
The wiki article is currently wrong IMO, the step 2 is totally redundant (and the whole block is called "Redirect to virtual serial port (com0com, Windows host)" instead of "Redirect to named pipe (Windows host)". If I set up a named pipe in VBox and then connect to it with Putty, why would I need to emulate COM ports?
Good point. Indeed, there is some illogic in it, I've noted that too. Thus, I've been bugged (no pun intended) by that too. I tried to hold on to the basic layout from the former wiki, but I was wondering why the com0com is needed too. I thought maybe just because of the drivers for making a virtual port, but if you don't use the com-port, what's the point. That's why I found the original wiki very confusing too: it wasn't clear if it was talking about the same method to get a log, or not.

So, aparently, it's not? There are, in fact, two ways to do it?

Could you maybe explain in detail the second one (with the port(s)-stuff, so I can change it accordingly in the wiki (as two seperate ways to go at it).
milon
Posts: 969
Joined: Sat Sep 05, 2009 9:26 pm

Re: Debug Logs on Windows - The Easy Guide

Post by milon »

The steps are laid out in my first post. ReactOS (debug) outputs to COM1 which VirtualBox takes. You tell VirtualBox to output on an emulated COM port (ie. COM4) which is created by com0com. Com0com emulates a pair of COM ports and you connect PuTTY to the second one (ie. COM5). Thus the debug flow is ROS -> VBox -> com0com -> PuTTY. PuTTY then makes the log file.
Webunny
Posts: 1201
Joined: Sat Apr 28, 2012 1:30 pm

Re: Debug Logs on Windows - The Easy Guide

Post by Webunny »

milon wrote:The steps are laid out in my first post. ReactOS (debug) outputs to COM1 which VirtualBox takes. You tell VirtualBox to output on an emulated COM port (ie. COM4) which is created by com0com. Com0com emulates a pair of COM ports and you connect PuTTY to the second one (ie. COM5). Thus the debug flow is ROS -> VBox -> com0com -> PuTTY. PuTTY then makes the log file.
Yes, but is the same achieved by the piping as it's explained in the wiki with vitualbox and putty? I mean: what is com0com doing there? Can I assume com0com is not necesaary at all, if I just name pipe Virtualbox and PuTTY? I mean, I didn't use any COM4 or COM5, after all.

So, it are two distinct methods? In that case, I will adapt it like that in the wiki as well.
MadWolf
Posts: 688
Joined: Sat Dec 31, 2005 4:19 am
Contact:

Re: Debug Logs on Windows - The Easy Guide

Post by MadWolf »

hi
Com0Com
com0com command shell
install PortName=COM4 PortName=COM5

VM setting -> serial port tab-> port 1 tab -> Port Number = Com1 -> Port Mode = Host Device -> Port/file path: = Com4 -> Putty -> putty ->serial -> serial line = com5


VM setting -> serial port tab-> port 1 tab -> Port Number = Com1 -> Port Mode = Host pipe -> Port/file path: = \\.\pipe\ros_pipe -> Putty -> putty ->serial -> serial line = \\.\pipe\ros_pipe
Webunny
Posts: 1201
Joined: Sat Apr 28, 2012 1:30 pm

Re: Debug Logs on Windows - The Easy Guide

Post by Webunny »

MadWolf wrote:hi
Com0Com
com0com command shell
install PortName=COM4 PortName=COM5

1)VM setting -> serial port tab-> port 1 tab -> Port Number = Com1 -> Port Mode = Host Device -> Port/file path: = Com4 -> Putty -> putty ->serial -> serial line = com5


2)VM setting -> serial port tab-> port 1 tab -> Port Number = Com1 -> Port Mode = Host pipe -> Port/file path: = \\.\pipe\ros_pipe -> Putty -> putty ->serial -> serial line = \\.\pipe\ros_pipe
There you go, so 2 ways of doing it, right? Or not? Let's be clear about this: do you HAVE to install Com0com if you only want to try 2) out, yes or no?

I must say I tried the first, but that didn't work (maybe due to the unsigned drivers in Vista, though). The second one worked like a charm.

Is there any reason one should use/prefer one above the other, or it doesn't matter?


Edit: Ok, re-tried the other (1st), and it does work, also. I'll adapt the wiki accordingly. Still need a definite answer to my questions, though. ;)
SomeGuy
Posts: 586
Joined: Mon Nov 29, 2004 9:48 am
Location: Marietta, GA

Re: Debug Logs on Windows - The Easy Guide

Post by SomeGuy »

I thought there was a data loss problem with pipes and heavy output. But I might be thinking of something else.
Webunny
Posts: 1201
Joined: Sat Apr 28, 2012 1:30 pm

Re: Debug Logs on Windows - The Easy Guide

Post by Webunny »

SomeGuy wrote:I thought there was a data loss problem with pipes and heavy output. But I might be thinking of something else.
Ok.

Well, anyways, I adapted the wiki a bit further in regard of some of the comments I got here, but now I think I'm pretty much finished with http://www.reactos.org/wiki/VirtualBox .

Thanks to all for any help given!
MadWolf
Posts: 688
Joined: Sat Dec 31, 2005 4:19 am
Contact:

Re: Debug Logs on Windows - The Easy Guide

Post by MadWolf »

There you go, so 2 ways of doing it, right? Or not?

Yes
Let's be clear about this: do you HAVE to install Com0com if you only want to try 2) out, yes or no?
i have not tested it but i do not think so
Download the Intel AC 97 driver from ReactOS Application Manager
Extract the files to C:\ReactOS\
Restart the virtual machine
Install and start your favorite audio playback or multimedia application (e.g. Winamp, VLC, MPlayer)
Open an audio file and play
at the end of setup when you get to the desktop for the first time you whill get the found new hardware wizard dialog

open the ReactOS Application Manager and Download the Intel AC 97 driver
Extract the files to C:\ReactOS\
on the found new hardware wizard dialog click next then finish

on next hardware wizard dialog will be the multimedia audio device
click next if you have extracted the drivers to the correct folder the you whill get installation complete
this wizard has finished installing the driver for: Avance AC97 Audio

Restart reactos if reactos does not bsod during boot then you will hear the startup sound
milon
Posts: 969
Joined: Sat Sep 05, 2009 9:26 pm

Re: Debug Logs on Windows - The Easy Guide

Post by milon »

Webunny wrote:There you go, so 2 ways of doing it, right? Or not? Let's be clear about this: do you HAVE to install Com0com if you only want to try 2) out, yes or no?

I must say I tried the first, but that didn't work (maybe due to the unsigned drivers in Vista, though). The second one worked like a charm.

Is there any reason one should use/prefer one above the other, or it doesn't matter?


Edit: Ok, re-tried the other (1st), and it does work, also. I'll adapt the wiki accordingly. Still need a definite answer to my questions, though. ;)
Yes there are 2 ways to do it. Way #1 involves com0com which is extra work for Win Vista and later. It's only useful if you're doing heavy logging. Way #2 does not need com0com.
User avatar
Black_Fox
Posts: 1584
Joined: Fri Feb 15, 2008 9:44 pm
Location: Czechia

Re: Debug Logs on Windows - The Easy Guide

Post by Black_Fox »

milon wrote:
Webunny wrote:(...)
Is there any reason one should use/prefer one above the other, or it doesn't matter?

Edit: Ok, re-tried the other (1st), and it does work, also. I'll adapt the wiki accordingly. Still need a definite answer to my questions, though. ;)
Yes there are 2 ways to do it. Way #1 involves com0com which is extra work for Win Vista and later. It's only useful if you're doing heavy logging. Way #2 does not need com0com.
There are 2 separate ways, yes. I found named pipes easier (1 less installation needed, also the com0com seemed not to work in the past on x64 systems). Also is it still true that named pipes in VBox can't adapt to the heavy logging? I though there were some improvement in VBox that fixed that issue and now both methods worked flawlessly.
Webunny
Posts: 1201
Joined: Sat Apr 28, 2012 1:30 pm

Re: Debug Logs on Windows - The Easy Guide

Post by Webunny »

Black_Fox wrote:
milon wrote:
Webunny wrote:(...)
Is there any reason one should use/prefer one above the other, or it doesn't matter?

Edit: Ok, re-tried the other (1st), and it does work, also. I'll adapt the wiki accordingly. Still need a definite answer to my questions, though. ;)
Yes there are 2 ways to do it. Way #1 involves com0com which is extra work for Win Vista and later. It's only useful if you're doing heavy logging. Way #2 does not need com0com.
There are 2 separate ways, yes. I found named pipes easier (1 less installation needed, also the com0com seemed not to work in the past on x64 systems). Also is it still true that named pipes in VBox can't adapt to the heavy logging? I though there were some improvement in VBox that fixed that issue and now both methods worked flawlessly.
Indeed, I don't see any shortcommings in the name piping method. Of course, I'm not that a heavy tester/logger neither.It would be interesting to know if that info wasn't obsolete by now. I mean, maybe that was true when it was first typed in the wiki years ago, but things move on and progress, so the matter might be solved by now.

I agree that named pipes are easier, especially if you have Vista/win7 and can't just install unsigned drivers.

In any case, I have put both methods there; people can still chose what they want.
milon
Posts: 969
Joined: Sat Sep 05, 2009 9:26 pm

Re: Debug Logs on Windows - The Easy Guide

Post by milon »

If the VBox issue with named pipes is truly fixed, then I vote to completely remove all references to com0com from the tutorial & wiki both. We're writing this for people who haven't yet figured out how to do logging because it's difficult to figure out on your own. Let's not make it needlessly complicated. ;)

EDIT - How would we test/confirm that this has been resolved? I suspect Webunny's on the right track, and it's probably been fixed ages ago.
Webunny
Posts: 1201
Joined: Sat Apr 28, 2012 1:30 pm

Re: Debug Logs on Windows - The Easy Guide

Post by Webunny »

milon wrote:If the VBox issue with named pipes is truly fixed, then I vote to completely remove all references to com0com from the tutorial & wiki both. We're writing this for people who haven't yet figured out how to do logging because it's difficult to figure out on your own. Let's not make it needlessly complicated. ;)

EDIT - How would we test/confirm that this has been resolved? I suspect Webunny's on the right track, and it's probably been fixed ages ago.
I concur. Occam's razor for wiki's ;) . If both methods are of equal worth, then only the most simple version should remain.

Edit: the problem is, to know for certain they are equal in all circumstances.
SomeGuy
Posts: 586
Joined: Mon Nov 29, 2004 9:48 am
Location: Marietta, GA

Re: Debug Logs on Windows - The Easy Guide

Post by SomeGuy »

Not all terminal programs support named pipes. There are many terminal programs out there, and some people may have a preference. Similarly other virtualizers/emulators may not support names pipes for output (But since the only others are VMWare, QEMU, and Bochs, someone could check).

Each method seems to have it's own advantages and disadvantages, so I think both really should be mentioned.
Webunny
Posts: 1201
Joined: Sat Apr 28, 2012 1:30 pm

Re: Debug Logs on Windows - The Easy Guide

Post by Webunny »

SomeGuy wrote:Not all terminal programs support named pipes. There are many terminal programs out there, and some people may have a preference. Similarly other virtualizers/emulators may not support names pipes for output (But since the only others are VMWare, QEMU, and Bochs, someone could check).

Each method seems to have it's own advantages and disadvantages, so I think both really should be mentioned.
Well, ok, but the part I specifically changed only deals with Virtualbox and Putty. The other VM's and such are handled below that, and are the 'old' ones: I didn't change anything there. I don't know how accurate they are. But anyway, if a particular terminal program/VM/emulator does not have pipe support, well, then it doesn't relate to Virtualbox or Putty, does it? The part I changed WAS about VB and Putty specifically, however, and those have piping, so one has to wonder why a more complicated system is needed with the same progs, for the same result.

On the other hand, I guess it can't hurt to let both methods stand, as long as it's clear it are two separate ways. Certainly as long as we aren't sure about the potential heavy output problem.
Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests