Quantcast

does libusb_set_debug work?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

does libusb_set_debug work?

Chuck Fossen

Hi,

I’m a newbie at libusb.

I’m wondering if libusb_set_debug() works. I can’t get any output from it.

I can turn on debug logging if I configure and build with --enable-debug-log.

Should I get about the same output as enable-debug-log if I set libusb_set_debug() to 3?

I don’t have the LIBUSB_DEBUG env variable set.

I assume I’m missing something simple.

Thanks,

chuckf


------------------------------------------------------------------------------

_______________________________________________
Libusb-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/libusb-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: does libusb_set_debug work?

Michael Plante
Chuck,

What version of the library are you using?  I suspect it does work on all
versions, but it's difficult to troubleshoot without more information.
(maybe your startup code, initialization calls, etc.)  In 0.1, there's a
global "int usb_debug = 0;" that you might be able to check in your code at
various points.  In 1.0, after libusb_init, it seems you could check the
"debug" and "debug_fixed" members of the context structure.  Something in
those might tell you why nothing's being output.  0.1 is usually pretty
verbose at level=2, but I don't have experience with 1.0.

Michael


-----Original Message-----
From: Chuck Fossen [mailto:[hidden email]]
Sent: Wednesday, June 24, 2009 11:41 AM
To: [hidden email]
Subject: [Libusb-devel] does libusb_set_debug work?


Hi,
I'm a newbie at libusb.
I'm wondering if libusb_set_debug() works. I can't get any output from it.
I can turn on debug logging if I configure and build
with --enable-debug-log.
Should I get about the same output as enable-debug-log if I set
libusb_set_debug() to 3?
I don't have the LIBUSB_DEBUG env variable set.
I assume I'm missing something simple.
Thanks,
chuckf


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Libusb-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/libusb-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: does libusb_set_debug work?

Xiaofan Chen
On Wed, Jul 8, 2009 at 12:27 PM, Michael Plante<[hidden email]> wrote:

> Chuck,
>
> What version of the library are you using?  I suspect it does work on all
> versions, but it's difficult to troubleshoot without more information.
> (maybe your startup code, initialization calls, etc.)  In 0.1, there's a
> global "int usb_debug = 0;" that you might be able to check in your code at
> various points.  In 1.0, after libusb_init, it seems you could check the
> "debug" and "debug_fixed" members of the context structure.  Something in
> those might tell you why nothing's being output.  0.1 is usually pretty
> verbose at level=2, but I don't have experience with 1.0.
>

He is talking about 1.0. Last time I tested I got the same result as
Chuck. libusb_set_debug() does not seem to work without --enable-debug-log.
But I will test it again. Take note usb_set_debug works under libusb 0.1.

--
Xiaofan http://mcuee.blogspot.com

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Libusb-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/libusb-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: does libusb_set_debug work?

Daniel Drake-2
Xiaofan Chen wrote:
> He is talking about 1.0. Last time I tested I got the same result as
> Chuck. libusb_set_debug() does not seem to work without --enable-debug-log.
> But I will test it again. Take note usb_set_debug works under libusb 0.1.

This is probably one of the most well documented functions that we have ;)

libusb_set_debug() enables messages that tell you when something is
going wrong or when you made a mistake. It allows you to enable error,
warning and informational messages which help you debug your program.
But because you're writing good programs and libusb doesn't have too
many bugs, you aren't going to see many messages.

If you additionally want verbose debug messages then you have to specify
that at libusb compile time, in which case libusb_set_debug() does
nothing - you will get all error/warning/info/debug messages, all of the
time.

Daniel


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Libusb-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/libusb-devel
Loading...